[ZBX-9628] map can't be opened or exported after editing Created: 2015 Jun 10  Updated: 2017 May 30  Resolved: 2015 Jun 12

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

Type: Incident report Priority: Trivial
Reporter: sles Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: maps, undefinedindex
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Centos 6


Issue Links:
Duplicate
duplicates ZBX-8690 Undefined index in Maps Closed

 Description   

Hello!

I already described problem here:

https://www.zabbix.com/forum/showthread.php?t=49758

So I just copy from forum:

user edited map and somehow it become broken , looks like bug, but main problem here is how to restore map, just because zabbix doesn't show o export map:

Undefined index: 10800 [sysmap.php:149 ? add_elementNames() in /var/www/html/zabbix-2.4.5/include/maps.inc.php:378]

and

[error] Undefined index: 10800 [sysmaps.php:112 → CConfigurationExport->export() → CConfigurationExport->gatherData() &rarr
; CConfigurationExport->gatherMaps() → CConfigurationExport->prepareMapExport() in /var/www/html/zabbix-2.4.5/include/classes/ex
port/CConfigurationExport.php:1018]

I solved this by

mysql> delete from sysmaps_elements where elementid=10800;

Reply With Quote

I don't know how user created problem, but I think this is wrong that map with such type of problem can't be opened without direct database interaction.
I think it will be better to warn user about problem but open map anyway, to let user correct problem, or any other solution, but using web interface.
Because there are no replies in forum I guess that only way to fix problem now is to directly fix database content.

Thank you!



 Comments   
Comment by Oleksii Zagorskyi [ 2015 Jun 11 ]

Could the user try to remember what exactly he did with the map before it became broken?

Comment by sles [ 2015 Jun 11 ]

Unfortunately no
This is why I'm asking not fix bug I don't know how to reproduce, but to provide healing mechanism in frontend.

Thank you!

Comment by Oleksii Zagorskyi [ 2015 Jun 11 ]

The error may probably depend on used PHP version.
My PHP version - 5.6.9
What I did to emulate the problem - added a Host element on a map and then manually deleted the host directly in DB.

Then my errors look like:

When try to view the map in Monitoring menu - I see only errors without the map:
as picture:

Undefined offset: 10163 [maps.php:97 add_elementNames() in /zab/www-dev/2.4.5/include/maps.inc.php:378]

as text:

Undefined offset: 10163 [maps.php:149 → CView->render() → include() → getActionMapBySysmap() in /zab/www-dev/2.4.5/include/maps.inc.php:145]
Undefined offset: 10163 [maps.php:149 → CView->render() → include() → getActionMapBySysmap() in /zab/www-dev/2.4.5/include/maps.inc.php:156]

When I try to edit the map - frontend pop-ups a java script warning Map image update failed and allows to edit the map. Bottom of screen I see error:

Undefined offset: 10163 [sysmap.php:149 → add_elementNames() in /zab/www-dev/2.4.5/include/maps.inc.php:378]

When click on the element - I see "null" as name for the selected host.

I can delete the element, update the map and it then can be shown without errors.

When I try to export the broken map - I can save the XML file, but it contains only:

[error] Undefined offset: 10163 [sysmaps.php:112 → CConfigurationExport->export() → CConfigurationExport->gatherData() → CConfigurationExport->gatherMaps() → CConfigurationExport->prepareMapExport() in /zab/www-dev/2.4.5/include/classes/export/CConfigurationExport.php:1018]
Comment by sles [ 2015 Jun 11 ]

As I metioned I run zabbix on current Centos 6 version, namely 6.6.
And PHP version is 5.3.3.
May be it depends on php.ini options, I'm not php expert...

Comment by sles [ 2015 Jun 11 ]

btw, you errors are
Undefined offset:
and I got
Undefined index:
so these are really different errors , probably because of different php versions.

Comment by Oleksii Zagorskyi [ 2015 Jun 11 ]

sles, are you sure that the map became broken only because of user activity in frontend ?

Could it be possible that the map contained some LLD created host|trigger and it has been deleted by zabbix server?

Do you use API to modify something in zabbix ?

Are you sure no one touched database manually ?

Comment by sles [ 2015 Jun 11 ]

Yes, I'm completely sure, he called me right after he somehow got map broken.
But he didn't know which step resulted in broken map.

And no, we don't use API, and nobody but me have access to database directly...

Comment by Oleksii Zagorskyi [ 2015 Jun 11 ]

What about LLD I asked above ?

Comment by richlv [ 2015 Jun 12 ]

closing as a duplicate of ZBX-8690

Comment by sles [ 2015 Jun 13 ]

There is no LLD here, and yes, I guess this is absolutely right duplicate bug.
Thank you!

Generated at Thu Nov 06 20:34:59 EET 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.