[ZBX-5619] Errors when importing a template with an empty screen Created: 2012 Sep 25  Updated: 2017 May 30  Resolved: 2012 Oct 02

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 2.0.2rc2
Fix Version/s: 2.0.4rc1, 2.1.0

Type: Incident report Priority: Minor
Reporter: Pavels Jelisejevs (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: frontend, import, screen, template, templatedscreens
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: XML File zbx_export_templates_template_screen.xml    

 Description   

When I try to import a template, that has a screen with no items, the template is imported, but a see an error:

Invalid argument supplied for foreach() [api/classes/CTemplateScreen.php:545]

When I try to import the same template again, I receive a different error:

Invalid argument supplied for foreach() [api/classes/CScreen.php:564]
Argument 1 passed to CScreenItem::updateByPosition() must be an array, string given, called in /opt/lampp/htdocs/zabbix/trunk/frontends/php/api/classes/CScreen.php on line 567 and defined [api/classes/CScreenItem.php:187]
Invalid argument supplied for foreach() [api/classes/CScreenItem.php:202]

I've attached the exported XML file.



 Comments   
Comment by Oleg Egorov (Inactive) [ 2012 Sep 27 ]

Resolved in branch svn://svn.zabbix.com/branches/dev/ZBX-5619

Comment by Alexey Fukalov [ 2012 Sep 28 ]

(1)
Fix should be done on import level rather than API, as we discussed.

RESOLVED

Vedmak Previous changes were not reverted

oleg.egorov RESOLVED

Vedmak CLOSED

Comment by Alexander Vladishev [ 2012 Oct 06 ]

Fixed in pre-2.0.4 r30595 and pre-2.1.0 (trunk) r30594.

Generated at Tue Apr 23 23:13:59 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.