I’m using TreeConnector for the first time, as I have previously generated custom XML to use with trees in my projects. When I load the data, I get the following error messages:
[31-Dec-2015 08:58:47 America/Chicago] PHP Warning: Missing argument 6 for TreeRenderStrategy::render_set(), called in E:\intranetbeta\Resources\dhtmlx\connector\v2.0\strategy.php on line 170 and defined in E:\intranetbeta\Resources\dhtmlx\connector\v2.0\strategy.php on line 152
[31-Dec-2015 08:58:47 America/Chicago] PHP Notice: Undefined variable: mix in E:\intranetbeta\Resources\dhtmlx\connector\v2.0\strategy.php on line 156
[31-Dec-2015 08:58:47 America/Chicago] PHP Notice: Undefined variable: mix in E:\intranetbeta\Resources\dhtmlx\connector\v2.0\strategy.php on line 158
[31-Dec-2015 08:58:47 America/Chicago] PHP Warning: Missing argument 6 for TreeRenderStrategy::render_set(), called in E:\intranetbeta\Resources\dhtmlx\connector\v2.0\strategy.php on line 170 and defined in E:\intranetbeta\Resources\dhtmlx\connector\v2.0\strategy.php on line 152
[31-Dec-2015 08:58:47 America/Chicago] PHP Notice: Undefined variable: mix in E:\intranetbeta\Resources\dhtmlx\connector\v2.0\strategy.php on line 156
[31-Dec-2015 08:58:47 America/Chicago] PHP Notice: Undefined variable: mix in E:\intranetbeta\Resources\dhtmlx\connector\v2.0\strategy.php on line 175
[31-Dec-2015 08:58:47 America/Chicago] PHP Notice: Undefined variable: mix in E:\intranetbeta\Resources\dhtmlx\connector\v2.0\strategy.php on line 175
Here is the code where I instantiate the tree:
var treeSoftwareList = createSoftwareListTree(tabsMain.cells("software")); // /IT/Inventory/inventory_software.js
treeSoftwareList.loadData(toolbarSoftware.currentBranch);
Here is the function it calls to create the tree:
[code]function createSoftwareListTree (container){
var tree = container.attachTree();
tree.loadData = function (branch) {
var url = "/IT/Inventory/inventory_processor.php?invtype=software&invaction=TreeSoftwareList&branch=" + branch;
console.log(url);
tree.load(url);
}
return tree;
}[/code]
And here’s the relevant portions of the PHP Connector call:
require($_SERVER['DOCUMENT_ROOT']."/Resources/dhtmlx/connector/v2.0/tree_connector.php");
require($_SERVER['DOCUMENT_ROOT']."/Resources/dhtmlx/connector/v2.0/db_mysqli.php");
$mysqli = new mysqli("server", "user", "password", "database);
$connector = new TreeConnector($mysqli, "MySQLi");
$connector->render_table("Inventory_Software","PackageID","Name","","ParentID");
The data loads fine, but I don’t want to be filling up my error logs with these messages. I don’t get the same issues with any of the other connectors I use (grid, form, options, and data), so it seems to be something in the TreeConnector class, but I couldn’t figure out what it was.