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

    Details

    • Type: Incident report
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.0beta2
    • Fix Version/s: 3.0.0rc1
    • Component/s: Frontend (F)
    • Labels:

      Description

      '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" } } }

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: