No node exists with id '0' when accessing properties from DynamicNode
Hi Guys - I'm having an issue pulling properties from DynamicNodes that results in the above error. I'm calling this code from a UserControl codebehind page. The code itself is very simple. It loops though a nodes children to determine how many children per column. I'm hoping that I am just doing something silly and someone can point out the obvious. Thanks!
private void AnalyzeGroupColumnCounts()
{
dynamic dnModel = new DynamicNode(Node.getCurrentNodeId());
int iGroupCounter = 0;
foreach (dynamic dChild in dnModel.Children)
{
// if the max index is less than the curent index
// we need add a 0 int as we will be incrementing it next
if ((GroupColCounts.Count - 1) <= iGroupCounter)
GroupColCounts.Add(0);
//increment the col count on the current group
GroupColCounts[iGroupCounter]++;
if (dChild.endsGroup)//if the group ends, move onto the next group
iGroupCounter++;
}
}
Oddly enough, once I deleted the children and created them again everything worked fine. I'm sure there is a bug in there but I'm not sure how to reproduce it or even report it :P.
No node exists with id '0' when accessing properties from DynamicNode
Hi Guys - I'm having an issue pulling properties from DynamicNodes that results in the above error. I'm calling this code from a UserControl codebehind page. The code itself is very simple. It loops though a nodes children to determine how many children per column. I'm hoping that I am just doing something silly and someone can point out the obvious. Thanks!
The line with the problem is this:
Oddly enough, once I deleted the children and created them again everything worked fine. I'm sure there is a bug in there but I'm not sure how to reproduce it or even report it :P.
If you achieve to reproduce the bug, you can create an issue here:
http://issues.umbraco.org
Just have a look first if there doesn't exist yet a similar bug report or that the bug already has been fixed for a next version.
is working on a reply...