Opened 11 years ago

Closed 11 years ago

#6405 closed defect (invalid)

Tree: error loading root children (regression from 1.0)

Reported by: oliver.may@… Owned by:
Priority: high Milestone:
Component: Dijit Version: 1.1.0
Keywords: Cc:
Blocked By: Blocking:

Description

After upgrading dojo to version 1.1.0 (from 1.0.2) the Tree widget stopped working. The error I get is "error loading root children" (digit/Tree.js line 755). I managed to isolate the problem to digit/Tree.js starting at line 178:

node = 
	( existingNode && !existingNode.getParent() ) ?
	existingNode :
	new dijit._TreeNode({
		item: item,
		tree: tree,
		isExpandable: model.mayHaveChildren(item),
		label: tree.getLabel(item)
	});

node gets set to existingNode even though existingNode has a parent (dom node). existingNode.getParent() returns null.

The problem originates when we construct a new Tree, the code how this is done can be found at our repository: https://majas.dfc.be/svn/majas/branches/1.3.x/majas-webapp/src/main/webapp/js/majas/widget/LayerTree.js right at the bottom!

Dojo version: 1.1.0 (latest from svn) Browser: firefox 2.0.0.13 and IE 6.0.2900.2180 OS: Windows XP

kind regards! Oliver May http://majas.dfc.be/

Change History (3)

comment:1 Changed 11 years ago by bill

Cc: oliver.may@… removed
Reporter: changed from guest to oliver.may@…
Summary: dijit.Tree stopped working after upgrade to dojo 1.1.0Tree: error loading root children (regression from 1.0)

Hi Oliver. Thanks for tracing down the problem but can you make a simpler test case? If the problem is indeed just from constructing a new Tree then it seems reproducible with just a few lines of code, right? If so, please write them at attach the file (using the Attach File button). (If trac is broken and you can't attach files then may need to just provide a link)

thanks!

comment:2 in reply to:  1 Changed 11 years ago by guest

Replying to bill:

Hi Oliver. Thanks for tracing down the problem but can you make a simpler test case? If the problem is indeed just from constructing a new Tree then it seems reproducible with just a few lines of code, right? If so, please write them at attach the file (using the Attach File button). (If trac is broken and you can't attach files then may need to just provide a link)

thanks!

Hi Bill. I have been unable to reproduce the problem in a few lines of code. I did find that the problem originates from a bug in our application that caused the root node of the tree json data to have no id. This bug didn't seem to surface until we upgraded to dojo 1.1.0. So i guess this problem is not realy a dojo issue. Thanks for your time anyhow, and for the great toolkit!

Kind regards,

Oliver May http://majas.dfc.be

comment:3 Changed 11 years ago by bill

Resolution: invalid
Status: newclosed

Hi Oliver, O.K. I'll close the ticket then. I guess if there's no id on an item all sorts of weird things could happen, although not sure exactly what's going on.

Note: See TracTickets for help on using tickets.