[ZBX-11345] Web scenarios issue Created: 2016 Oct 11  Updated: 2024 Apr 10  Resolved: 2017 Apr 03

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A), Frontend (F)
Affects Version/s: 2.2.16rc1, 2.2.18rc1, 3.0.9rc1, 3.2.5rc1, 3.4.0alpha1
Fix Version/s: 2.2.17, 3.0.9rc1, 3.2.5rc1, 3.4.0alpha1

Type: Incident report Priority: Trivial
Reporter: Oleg Egorov (Inactive) Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: webscenario
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Team: Team C
Sprint: Sprint 3, Sprint 4, Sprint 5
Story Points: 0.5

 Description   

Error "Undefined offset" when trying to update web scenario step which was deleted via api call.

Undefined offset: 243 [ in C:\xampp\htdocs\ZBX-10842\frontends\php\httpconf.php:220]
Argument 2 passed to CArrayHelper::unsetEqualValues() must be of the type array, null given, called in C:\xampp\htdocs\ZBX-10842\frontends\php\httpconf.php on line 220 and defined [httpconf.php:220 ? CArrayHelper::unsetEqualValues() in C:\xampp\htdocs\ZBX-10842\frontends\php\include\classes\helpers\CArrayHelper.php:157]
Undefined offset: 242 [ in C:\xampp\htdocs\ZBX-10842\frontends\php\httpconf.php:220]
Argument 2 passed to CArrayHelper::unsetEqualValues() must be of the type array, null given, called in C:\xampp\htdocs\ZBX-10842\frontends\php\httpconf.php on line 220 and defined [httpconf.php:220 ? CArrayHelper::unsetEqualValues() in C:\xampp\htdocs\ZBX-10842\frontends\php\include\classes\helpers\CArrayHelper.php:157]
No permissions to referred object or it does not exist! [httpconf.php:226 ? CAPIObject->update() ? CAPIObject->__call() ? czbxrpc::call() ? czbxrpc::callAPI() ? call_user_func() ? CHttpTest->update() ? CHttpTest->validateUpdate() ? CHttpTest->checkSteps() ? CZBXAPI::exception() in C:\xampp\htdocs\ZBX-10842\frontends\php\api\classes\CHttpTest.php:606]

How to reproduce:
1. Update web scenario via frontend
2. Then update it via API
For example:

$httpTests = API::HttpTest()->update(array(
	'httptestid' => 93,
	'name' => '2',
	'hostid' => 10114,
	'status' => 0,
	'delay' => 60,
	'applicationid' => '0',
	'steps' => array(
		array(
			'name' => '1',
			'url' => '1'
		),
		array(
			'name' => '2',
			'url' => '2'
		)
	)
));

3. In frontend press F5, then resubmit form from [1].



 Comments   
Comment by Jevgenijs Petahins [ 2016 Oct 11 ]

Config:
Zabbix 3.0.4
Item:
Type: Zabbix trapper
Key: remote.hostname.resolver
Type of information: Text

zabbix_sender -z 127.0.0.1 -p 10050 -s zbxhost -k remote.hostname.resolver -o 0 -vv

Result:
zabbix_sender [2621]: DEBUG: answer [ZBX_NOTSUPPORTED]
zabbix_sender [2621]: Warning: incorrect answer from server [ZBX_NOTSUPPORTED]

Comment by richlv [ 2016 Oct 11 ]

chuguniy, that doesn't seem to be connected to this issue, and you are also trying to send the value to the agent port (the default server port is 10051)

Comment by Gregory Chalenko [ 2017 Mar 15 ]

Issue can occur when user trying to update web scenario steps which were removed by api update made after user opened web scenario for editing.
Now, for such situation user will see message "No permissions to referred object or it does not exist!"

Fixed in: svn://svn.zabbix.com/branches/dev/ZBX-11345 r66396

Comment by Gregory Chalenko [ 2017 Mar 15 ]

(1) [F] Translation string changes
No changes.

sasha CLOSED

Comment by Gregory Chalenko [ 2017 Apr 03 ]

Fixed in:

  • 2.2 r67025
  • 3.0 r67026
  • 3.2 r67027
  • 3.4.0aplha1(trunk) r67029
Generated at Sat Apr 27 00:50:57 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.