A rendering problem with smartRefreshBranch

Hi there,

I’m using dhtmlSuite V2.5 Pro build 91111 and I’m having a rather strange rendering problem with a tree I’m building dynamically and updating with smartRefreshBranch. I’ve spent a while trying to reduce the problem to its simplest state and I think this is about as simple as I can make it (the real problem has several trees on the page and event/timer based updating and enables smartXMLParsing):

dhxLayout object filling browser window
dhxTimelineTree=new dhtmlXTreeObject(“timelineTreeBox”,“100%”,“100%”,0);

then on a form:
<INPUT TYPE=“button” NAME=“a” VALUE=“a” onClick=“dhxTimelineTree.smartRefreshBranch(“0”);”/>

Some simplified example XML from the server end looks like:

<?xml version="1.0" encoding="ISO-8859-1"?>

What I find is that if the server generating this XML adds nodes periodically and groups them such that there are a limited number of child items per top level node and when one is full, a new one is created, if I interactively open the first top level node then smartRefreshBranch() post creation of a new top level node, the new node is misrendered as being a child of the first open top level node and furthermore attempts to deleteChildItems(“0”) and loadXML without forcing a page refresh fail.

I get this in the Error Console of Firefox:
Error: uncaught exception: [Exception… “Node cannot be inserted at the specified point in the hierarchy” code: “3” nsresult: “0x80530003 (NS_ERROR_DOM_HIERARCHY_REQUEST_ERR)” location: “ Line: 70”]

And this during a deleteChildItems(“0”)/loadXML
Error: uncaught exception: [Exception… “Node was not found” code: “8” nsresult: “0x80530008 (NS_ERROR_DOM_NOT_FOUND_ERR)” location: “ Line: 179”]

However, forcing a clean reload of the tree data renders it correctly.

I’ve attached a screenshot of the misrendering as the description isn’t necessarily very clear :slight_smile:

The problem occurs both on Firefox 3.5 and MSIE 6

Any assistance you could offer would be very gratefully received as I’ve spent a little while trying permutations of options trying to fix this now.


please provide the complete demo or a direct link to the problematic page to recreate the issue.


Thanks for responding promptly. Please find attached a tar.gz of some source that demonstrates the problem. It needs PHP5. If you browse to the included demo.php then hit Set/Reset Cookie and then periodically hit Update, you should see the problem demonstrated.


The problem is confirmed and fixed. To get the fixed version you can create a ticket at support.dhtmlx.com/ or send email to support at dhtmlx.com


Thank you for fixing this so promptly! I have submitted a support ticket requesting the fix.


Just to confirm, your fix works for me as well. Thank you very much for such rapid work!