[ZBX-10339] Undefined index: conditiontype when adding LLD rules with Filter conditions chained with AND Created: 2016 Feb 02  Updated: 2017 May 30  Resolved: 2016 Feb 03

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 3.0.0beta2
Fix Version/s: 3.0.0rc1

Type: Incident report Priority: Minor
Reporter: Vitaly Zhuravlev Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: lld
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File err1.PNG    

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



 Comments   
Comment by Gunars Pujats (Inactive) [ 2016 Feb 02 ]

(1) No translation strings changed.

iivs CLOSED

Comment by Gunars Pujats (Inactive) [ 2016 Feb 02 ]

RESOLVED in development branch svn://svn.zabbix.com/branches/dev/ZBX-10339

Comment by Ivo Kurzemnieks [ 2016 Feb 03 ]

TESTED

Comment by Gunars Pujats (Inactive) [ 2016 Feb 03 ]

Fixed in:

  • pre-3.0.0rc1 (trunk) r58239
Generated at Sat Apr 20 16:08:36 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.