-
Problem report
-
Resolution: Fixed
-
Critical
-
5.4.4rc1, 6.0.0alpha1, 6.0.5
-
Sprint 90 (Jul 2022), Sprint 91 (Aug 2022)
-
0.25
Steps to reproduce:
- Create new database
- Turn on agent and server.
- Wait until discovery rule "Network interface discovery" discovered.
- Remove template - "Linux network interface by Zabbix agent".
Result:
pg_query(): Query failed: ERROR: update or delete on table "valuemap" violates foreign key constraint "c_items_3" on table "items" DETAIL: Key (valuemapid)=(63) is still referenced from table "items". [templates.php:467 -> CApiWrapper->__call() -> CFrontendApiWrapper->callMethod() -> CApiWrapper->callMethod() -> CFrontendApiWrapper->callClientMethod() -> CLocalApiClient->callMethod() -> CTemplate->delete() -> DB::delete() -> DBexecute() -> pg_query() -> CConfigFile->{closure}() in include/db.inc.php:349]
runtime error. Can't remove template.
Expected:
template removed