-
Problem report
-
Resolution: Fixed
-
Trivial
-
7.0.0alpha4
-
None
-
Sprint 103 (Aug 2023)
-
1
Steps to reproduce:
- Create 2 templates;
- Add an item to one of templates - zabbix trapper, for example;
- Edit the template with no items and link the template with items to it (add in templates multiselect);
- Update the template;
- Edit the same template again and unlink the linked template.
Result:
No error or success messages displayed and template is not unlinked (see attached video).
Configuration of templates - Google Chrome 2023-08-07 09-59-54.mp4
Also multiple errors are logged in the error log:
Undefined index: type in ~/work/branches/master/ui/include/classes/api/services/CItemGeneral.php on line 1309, referer: http://192.168.27.4/master/ui/templates.php Undefined index: type in ~/work/branches/master/ui/include/classes/api/services/CItemGeneral.php on line 1310, referer: http://192.168.27.4/master/ui/templates.php Uncaught TypeError: Argument 1 passed to CItemTypeFactory::getObject() must be of the type int, null given, called in ~/work/branches/master/ui/include/classes/api/services/CItemGeneral.php on line 1310 and defined in ~/work/branches/master/ui/include/classes/api/CItemTypeFactory.php:37\nStack trace:\n#0 ~/work/branches/master/ui/include/classes/api/services/CItemGeneral.php(1310): CItemTypeFactory::getObject()\n#1 ~/work/branches/master/ui/include/classes/api/services/CItem.php(817): CItemGeneral::addFieldDefaultsByType()\n#2 ~/work/branches/master/ui/include/classes/api/services/CItem.php(1363): CItem::updateForce()\n#3 ~/work/branches/master/ui/include/classes/api/services/CHostGeneral.php(596): CItem::unlinkTemplateObjects()\n#4 ~/work/branches/master/ui/include/classes/api/services/CHostGeneral.php(392): CHostGeneral::unlinkTemplatesObjects()\n#5 ~/work/branches/master/ui/include/classes/api/services/CTemplate.php(49 in ~/work/branches/master/ui/include/classes/api/CItemTypeFactory.php on line 37, referer: http://192.168.27.4/master/ui/templates.php Undefined index: file in ~/work/branches/master/ui/include/classes/debug/CProfiler.php on line 381, referer: http://192.168.27.4/master/ui/templates.php Undefined index: line in ~/work/branches/master/ui/include/classes/debug/CProfiler.php on line 381, referer: http://192.168.27.4/master/ui/templates.php Cannot modify header information - headers already sent in ~/work/branches/master/ui/include/classes/helpers/CCookieHelper.php on line 59, referer: http://192.168.27.4/master/ui/templates.php Unknown: Failed to write session data using user defined save handler. (session.save_path: /var/lib/php/sessions) in Unknown on line 0, referer: http://192.168.27.4/master/ui/templates.php
Expected:
Template unlinked with no errors.
Note: This affects only master branch.
- caused by
-
ZBXNEXT-6986 Implement audit for LLD rules
- Closed