Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-22780

Error appears if template is linked through mass update with circular linkage

XMLWordPrintable

      Precondition: Only Zabbix 5.0 version

      Steps to reproduce:

      • Create 3 templates e.g. test1, test2, test3
      • Select e.g. test3 template and open mass update options
      • Try to link template test1, test2 and test3 to template test3

      Result: Blank page and no validation error.
      Error in logs:

      Error: Xdebug has detected a possible infinite loop, and aborted your script with a stack depth of '256' frames in /home/zabbix/workspace/5.0/ui/include/classes/api/services/CHostBase.php:211
      Stack trace:
      #0 /home/zabbix/workspace/5.0/ui/include/classes/api/services/CHostBase.php(218): CHostBase::checkTemplateCircularLinkage()
      #1 /home/zabbix/workspace/5.0/ui/include/classes/api/services/CHostBase.php(218): 
      ...
      241 /home/zabbix/workspace/5.0/ui/include/classes/api/services/CHostBase.php(218): CHostBase::checkTemplateCircularLinkage()
      #242 /home/zabbix/workspace/5.0/ui/include/classes/api/services/CHostBase.php(262): CHostBase::checkTemplateCircularLinkage()
      #243 /home/zabbix/workspace/5.0/ui/include/classes/api/services/CHostBase.php(140): CHostBase::checkCircularLinkage()
      #244 /home/zabbix/workspace/5.0/ui/include/classes/api/services/CHostGeneral.php(178): CHostBase->link()
      #245 /home/zabbix/workspace/5.0/ui/include/classes/api/services/CHostGeneral.php(98): CHostGeneral->link()
      #246 /home/zabbix/workspace/5.0/ui/include/classes/api/services/CTemplate.php(873): CHostGeneral->massAdd()
      #247 /home/zabbix/workspace/5.0/ui/include/classes/api/services/CTemplate.php(1011): CTemplate->massAdd()
      #248 /home/zabbix/workspace/5.0/ui/include/classes/api/services/CTemplate.php(587): CTemplate->massUpdate()
      #249 /home/zabbix/workspace/5.0/ui/include/classes/api/clients/CLocalApiClient.php(113): CTemplate->update()
      #250 /home/zabbix/workspace/5.0/ui/include/classes/api/wrappers/CFrontendApiWrapper.php(97): CLocalApiClient->callMethod()
      #251 /home/zabbix/workspace/5.0/ui/include/classes/api/wrappers/CApiWrapper.php(94): CFrontendApiWrapper->callClientMethod()
      #252 /home/zabbix/workspace/5.0/ui/include/classes/api/wrappers/CFrontendApiWrapper.php(63): CApiWrapper->callMethod()
      #253 /home/zabbix/workspace/5.0/ui/include/classes/api/wrappers/CApiWrapper.php(82): CFrontendApiWrapper->callMethod()
      #254 /home/zabbix/workspace/5.0/ui/templates.php(460): CApiWrapper->__call()
      #255 {main}
      

      See video attachment:

      Expected: Validation error "Circular template linkage is not allowed." should appear.

            kseve Kirils Seve
            kseve Kirils Seve
            Team B
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: