Hi all,
I'm converting some old .88 Scripts to 1.x and have an issue using the function
function api_tree_delete_node($tree_id, $node_id) which calls:
api_parse_node_data($tree_id, $node_id) returning error
No matter how I slice it, i'll get :
PHP Notice: Undefined offset: 1 in /var/www/html/cacti/lib/api_tree.php on line 428
I'm feeding the script a $node_id = 18271 and $tree_id = 2.
var_dump of the variable reveals string(5) "18271", but it appears to be wanting a different format??
What in the world am I doing wrong?
api_parse_node_data($tree_id, $node_id) returning error
Moderators: Developers, Moderators
Re: api_parse_node_data($tree_id, $node_id) returning error
What version are you test against?
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: api_parse_node_data($tree_id, $node_id) returning error
PHP 5.4.16 (cli) (built: Jan 23 2018 07:26:54)
Re: api_parse_node_data($tree_id, $node_id) returning error
You are not specifying that node type. If this is a branch, it should have tbranch:<id> orelse a graph is tgraph:<id> or finally a host is thost:<id>. You can specify a combination of these seperated by underscores "tbranch:2_thost:5" for example.
Cacti Developer & Release Manager
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
The Cacti Group
Director
BV IT Solutions Ltd
+--------------------------------------------------------------------------+
Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
Re: api_parse_node_data($tree_id, $node_id) returning error
Thanks for the help, I've got it up and running.
Who is online
Users browsing this forum: No registered users and 0 guests