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

Undefined index: conditiontype when adding LLD rules with Filter conditions chained with AND

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Fixed
    • Icon: Minor Minor
    • 3.0.0rc1
    • 3.0.0beta2
    • Frontend (F)

      'Undefined index: conditiontype' error when adding LLD rules with Filter conditions chained with AND:

      Undefined index: conditiontype [host_discovery.php:315 ? CFrontendApiWrapper->update() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CDiscoveryRule->update() ? CDiscoveryRule->checkInput() ? CApiService->checkValidator() ? CSchemaValidator->validate() ? CConditionValidator->validate() in include/classes/validators/object/CConditionValidator.php:65]
      Undefined index: conditiontype [host_discovery.php:315 ? CFrontendApiWrapper->update() ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? call_user_func_array() ? CDiscoveryRule->update() ? CDiscoveryRule->checkInput() ? CApiService->checkValidator() ? CSchemaValidator->validate() ? CConditionValidator->validate() in include/classes/validators/object/CConditionValidator.php:65]
      

      To reproduce:
      1. Go to default template with LLD, like Template SNMP Interfaces
      2. Define two Filters in 'Network interfaces' discovery:

      {#SNMPINDEX} matches 1 {#SNMPVALUE} matches 1
      3. Type of calculation choose And instead of And/Or
      4. Click Details to see the error
      5. To repeat the problem change Type of calculation back to And/Or, Update, and then back to And.
      6. Issue can be also seen when reimporting the template containing such discovery

      P.S.
      Contents of var_dump($object) in validate function:

      array(2) { ["evaltype"]=> string(1) "1" ["conditions"]=> array(2) { [0]=> array(3) { ["formulaid"]=> string(1) "A" ["macro"]=> string(12) "{#SNMPINDEX}

      " ["value"]=> string(1) "1" } [1]=> array(3) { ["formulaid"]=> string(1) "B" ["macro"]=> string(12) "

      {#SNMPVALUE}

      " ["value"]=> string(1) "2" } } }

            Unassigned Unassigned
            vzhuravlev Vitaly Zhuravlev
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: