[ZBX-2690] add xml validation for screens xml Created: 2010 Jul 13  Updated: 2017 May 30  Resolved: 2010 Sep 01

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: None
Fix Version/s: 1.8.4

Type: Incident report Priority: Major
Reporter: Alexey Fukalov Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: XML File zbx_maps_export.xml    
Issue Links:
Duplicate
duplicates ZBX-2581 XML must be validated to have all man... Closed

 Comments   
Comment by Alexey Fukalov [ 2010 Jul 13 ]

ZBX-2690

Comment by richlv [ 2010 Aug 30 ]

dev branch rev 14146.

importing attached zbx_maps_export.xml results in errors :

Undefined index: images[/usr/local/apache2/htdocs/dev/ZBX-2690/include/export.inc.php:570]
Invalid argument supplied for foreach()[/usr/local/apache2/htdocs/dev/ZBX-2690/include/export.inc.php:573]
Undefined index: sysmaps[/usr/local/apache2/htdocs/dev/ZBX-2690/include/export.inc.php:614]
Invalid argument supplied for foreach()[/usr/local/apache2/htdocs/dev/ZBX-2690/include/export.inc.php:616]

Comment by richlv [ 2010 Aug 30 ]

so we ignore map import problems for now. screen problems :

de branch rev 14153.

1. export a screen with url element, importing it fails :
Error 26: Element screenitem has extra content: url

2. importing a screen that has a map element fails :
Error 28: Datatype element resourceid has child elements

3. importing an xml with more than one screen in it fails :
Error 38: Did not expect element screen there

4. if a tag line (for example, <width>) is repeated, error message does not give line number :
Error 12: Extra element width in interleave [ Line: 0 | Column: 0 ]

5. importing an xml with "status of hostgroup triggers" element that is filtered by group fails :
Error 28: Datatype element resourceid has child elements

Comment by Alexey Fukalov [ 2010 Aug 30 ]

fixed all, except 4. its library errors.. cannot do much about it

Comment by richlv [ 2010 Aug 30 ]

dev branch rev 14176.

5. same is true for "Status of host triggers"

Comment by Alexey Fukalov [ 2010 Aug 31 ]

fixed

Comment by richlv [ 2010 Aug 31 ]

dev branch rev 14205.

6. screens.rng has CRLF newlines and trailing whitespace (line 68)

other than that works fine & can be merged after fixing item 6.

Comment by Alexey Fukalov [ 2010 Aug 31 ]

fixed

Comment by richlv [ 2010 Sep 01 ]

everything seems to be ok now

Comment by Alexey Fukalov [ 2010 Sep 01 ]

branches/1.8 14228

Generated at Wed Apr 24 09:08:41 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.