Possible bug in tree handling when creating first subnode in 4.0.2.1
During the weekend I spent some time getting auto refresh of our nodes for uCommerce Admin to work. I hit what I thought to be a bug in our code but further investigation showed that it might be an issues with Umbraco itself.
Steps to repro:
1) Create a node
2) Create the first subnode
The new subnode will not appear after create or save. Nor will a reload nodes on the parent make it show up.
The only way to have it appear is to refresh the entire browser. The bug is caused by xTree only looking for child nodes when a node is clicked the first time. Consequent clicks will not cause a callback to the server because the node is set not to.
I've found a fix in xTree.js, which triggers the check for children every time a node is clicked, but I'm not sure it's the appropriate fix as it will cause more callback to the server even in cases where they are not required.
Let me know what you think about this. The fix is removing a single line in xTree.js.
Have you tried refreshing grandparent? I've also experienced that and think it may 'solve' your issue! Otherwise, a switch between different sections will also help... If you add the issue to Codeplex, I'll do my part voting for it :)
Possible bug in tree handling when creating first subnode in 4.0.2.1
During the weekend I spent some time getting auto refresh of our nodes for uCommerce Admin to work. I hit what I thought to be a bug in our code but further investigation showed that it might be an issues with Umbraco itself.
Steps to repro:
1) Create a node
2) Create the first subnode
The new subnode will not appear after create or save. Nor will a reload nodes on the parent make it show up.
The only way to have it appear is to refresh the entire browser. The bug is caused by xTree only looking for child nodes when a node is clicked the first time. Consequent clicks will not cause a callback to the server because the node is set not to.
I've found a fix in xTree.js, which triggers the check for children every time a node is clicked, but I'm not sure it's the appropriate fix as it will cause more callback to the server even in cases where they are not required.
Let me know what you think about this. The fix is removing a single line in xTree.js.
Hi Soren,
Have you tried refreshing grandparent? I've also experienced that and think it may 'solve' your issue! Otherwise, a switch between different sections will also help... If you add the issue to Codeplex, I'll do my part voting for it :)
Cheers,
/Dirk
It does work refresh the grand parent as you put it. With that in mind is the fix for refresh the parent still interesting?
YES!
I'd submit as a patch to Codeplex.
TIA,
/Dirk
Alrighty. I'll checkout the Umbraco code and create the patch.
is working on a reply...