Assign template to a host - Field "parent_itemid" cannot be set to NULL.

XMLWordPrintable

    • Type: Problem report
    • Resolution: Cannot Reproduce
    • Priority: Trivial
    • None
    • Affects Version/s: 5.0.10
    • Component/s: Templates (T)
    • None

      We have a random problem depending on the host where we assign the same template. It returns an error that I can't debug.

      Before posting an issue here I asked on IRC and was told it could be a bug.

       

      Steps to reproduce:

      1. Go to a host
      2. Add specific template
      3. Return an error

      Result:

      Undefined index: ruleid [hosts.php:854 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHost->update() → CHost->massUpdate() → CHost->massAdd() → CHostGeneral->massAdd() → CHostGeneral->link() → CItemPrototype->syncTemplates() → CItemGeneral->inherit() → CItemGeneral->_inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:984]
      Undefined index: [hosts.php:854 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHost->update() → CHost->massUpdate() → CHost->massAdd() → CHostGeneral->massAdd() → CHostGeneral->link() → CItemPrototype->syncTemplates() → CItemGeneral->inherit() → CItemGeneral->_inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:984]
      Undefined index: ruleid [hosts.php:854 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHost->update() → CHost->massUpdate() → CHost->massAdd() → CHostGeneral->massAdd() → CHostGeneral->link() → CItemPrototype->syncTemplates() → CItemGeneral->inherit() → CItemGeneral->_inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:984]
      Undefined index: [hosts.php:854 → CApiWrapper->__call() → CFrontendApiWrapper->callMethod() → CApiWrapper->callMethod() → CFrontendApiWrapper->callClientMethod() → CLocalApiClient->callMethod() → CHost->update() → CHost->massUpdate() → CHost->massAdd() → CHostGeneral->massAdd() → CHostGeneral->link() → CItemPrototype->syncTemplates() → CItemGeneral->inherit() → CItemGeneral->_inherit() → CItemGeneral->prepareInheritedItems() in include/classes/api/services/CItemGeneral.php:984]
      Field "parent_itemid" cannot be set to NULL.
      

            Assignee:
            Oleksii Zagorskyi
            Reporter:
            Florian Bellencontre
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: