[ZBX-4323] host.create + profile = profile not inserts Created: 2011 Nov 07  Updated: 2017 May 30  Resolved: 2011 Nov 08

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A)
Affects Version/s: 1.8.5
Fix Version/s: 1.8.9

Type: Incident report Priority: Major
Reporter: Artur Kraev Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: api
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate

 Description   

While using host.create, and set profile values for new host, looks like profile does not inserts into database.

API request (IPs chaged:

{"params":[{"host":"123","ip":"0.0.0.0","dns":"","useip":1,"groups":[

{"groupid":6}

],"profile":

{"name":"123","contact":"test client","location":"test"}

,"parentTemplates":[

{"templateid":10047}

]}],"auth":"d65d71256c08764e357d3474737d0de6","jsonrpc":"2.0","method":"host.create","id":1}

I'm fixed this bug in my installation by changing line 38860 in class.chost.php :

if(isset($host['profile']) && !empty($host['extendedProfile'])) {

changed to

if(isset($host['profile']) && !empty($host['profile'])) {

after this problem dissapeared



 Comments   
Comment by Alexey Fukalov [ 2011 Nov 07 ]

dev branch: svn://svn.zabbix.com/branches/dev/ZBX-4323

Comment by Alexey Fukalov [ 2011 Nov 08 ]

svn://svn.zabbix.com/branches/1.8 23045

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