-
Problem report
-
Resolution: Fixed
-
Blocker
-
4.0.30, 4.0.31
-
None
-
Sprint 77 (Jun 2021)
-
1
Cannot import template for 4.0.30 and 4.0.31. It works on 4.0.29.
cannot-dependent-item-for-item-prototype.xml
While importing template, it tells:
Undefined index: ruleid [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->createReal() in include/classes/api/services/CItemPrototype.php:408] Field "parent_itemid" cannot be set to NULL. [conf.import.php:166 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CConfiguration->import() → CConfigurationImport->import() → CConfigurationImport->processDiscoveryRules() → CConfigurationImport->createEntitiesWithDependency() → CItemPrototype->create() → CItemPrototype->createReal() → DB::insertBatch() → DB::checkValueTypes() → DB::exception() in include/classes/db/DB.php:329]
Another way to see the issue, when developing a template from scratch:
1) create a new template
2) create one text item which is supposed to receive a JSON content
3) create an LLD rule
4) create an item prototype and trying to link it with "pure item", it will say:
Undefined index: ruleid [disc_prototypes.php:605 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CItemPrototype->create() → CItemPrototype->createReal() in include/classes/api/services/CItemPrototype.php:408]
Field "parent_itemid" cannot be set to NULL. [disc_prototypes.php:605 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CItemPrototype->create() → CItemPrototype->createReal() → DB::insertBatch() → DB::checkValueTypes() → DB::exception() in include/classes/db/DB.php:329]
- caused by
-
ZBXNEXT-6565 Performance improvements for host.create, template.update. templates linking process, DB::insert() method
- Closed