Hi,
I can't figure this one out, mainly because I am not great with MySQL. If we create a new map, add an element and then click Update, the following message appears:
Map update failed.
error: Error in query [INSERT INTO sysmaps_elements (selementid,elementtype,elementid,iconid_off,label ,label_location,x,y,use_iconmap,application,sysmap id) VALUES ('163','4','0','1','New element','-1','551','251','1','','12')] [Cannot add or update a child row: a foreign key constraint fails (`zabbix`.`sysmaps_elements`, CONSTRAINT `c_sysmaps_elements_2` FOREIGN KEY (`iconid_off`) REFERENCES `images` (`imageid`))]
error: SQL statement execution has failed "INSERT INTO sysmaps_elements (selementid,elementtype,elementid,iconid_off,label ,label_location,x,y,use_iconmap,application,sysmap id) VALUES ('163','4','0','1','New element','-1','551','251','1','','12')".
The behaviour also happens when I try to make a new element on an existing Map. If I delete an element from an existing Map and click Update, everything works fine.
Any help is greatly appreciated.
I can't figure this one out, mainly because I am not great with MySQL. If we create a new map, add an element and then click Update, the following message appears:
Map update failed.
error: Error in query [INSERT INTO sysmaps_elements (selementid,elementtype,elementid,iconid_off,label ,label_location,x,y,use_iconmap,application,sysmap id) VALUES ('163','4','0','1','New element','-1','551','251','1','','12')] [Cannot add or update a child row: a foreign key constraint fails (`zabbix`.`sysmaps_elements`, CONSTRAINT `c_sysmaps_elements_2` FOREIGN KEY (`iconid_off`) REFERENCES `images` (`imageid`))]
error: SQL statement execution has failed "INSERT INTO sysmaps_elements (selementid,elementtype,elementid,iconid_off,label ,label_location,x,y,use_iconmap,application,sysmap id) VALUES ('163','4','0','1','New element','-1','551','251','1','','12')".
The behaviour also happens when I try to make a new element on an existing Map. If I delete an element from an existing Map and click Update, everything works fine.
Any help is greatly appreciated.
Comment