[ZBX-13570] Undefined index in API call Created: 2018 Mar 05  Updated: 2024 Apr 10  Resolved: 2018 Mar 15

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 3.4.7
Fix Version/s: 3.4.8rc1, 4.0.0alpha5, 4.0 (plan)

Type: Problem report Priority: Minor
Reporter: Alexander Vladishev Assignee: Andrejs Griščenko
Resolution: Fixed Votes: 0
Labels: undefinedindex
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File FrontendError1.png     PNG File FrontendError2.png    
Issue Links:
Causes
caused by ZBXNEXT-18 Send an alert after trigger being ack... Closed
Team: Team B
Sprint: Sprint 29
Story Points: 0.25

 Description   

Steps to reproduce:

  1. create API request:
    1. API::Action()->get([
          'output' => ['actionid', 'name'],
          'selectAcknowledgeOperations' => ['operationid', 'recovery'],
          'actionids' => 3
      ]);

Result:

  1. incorrect response:
    Array
    (
        [0] => Array
            (
                [actionid] => 3
                [name] => Report problems to Zabbix administrators
                [acknowledgeOperations] => Array
                    (
                    )
            )
        [1] => Array
            (
                [acknowledgeOperations] => Array
                    (
                        [0] => Array
                            (
                                [operationid] => 12
                                [recovery] => 2
                            )
                    )
            )
    )
  2. Error message:
    Undefined index: actionid [hostgroups.php:65 ? CApiWrapper->__call() ? CFrontendApiWrapper->callMethod() ? CApiWrapper->callMethod() ? CFrontendApiWrapper->callClientMethod() ? CLocalApiClient->callMethod() ? CAction->get() ? CAction->addRelatedObjects() in include/classes/api/services/CAction.php:2043]


 Comments   
Comment by Andrejs Griščenko [ 2018 Mar 13 ]

(1) No translation strings changes.

sasha CLOSED

Comment by Andrejs Griščenko [ 2018 Mar 13 ]

RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-13570

Comment by Andrejs Griščenko [ 2018 Mar 15 ]

Fixed in:

  • 3.4.8rc1 78673
  • 4.0.0alpha5 (trunk) r78675
Comment by Marc [ 2018 Apr 18 ]

We recently upgraded from 3.0 to 3.4.8 Now users experience now and then an error message in the Zabbix frontend.

E.g.:

or:

I haven't investigated that yet. But "Undefined index" in combination with "acknowledges" found in this ticket catch my attention.

Are errors attached possibly a side-effect of this fix?

Edit:
Doh, after a second read i noticed this was about action.get() but our issue seems to be related to events.

Generated at Thu Apr 25 17:56:45 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.