Hello, on a brandnew 3.0.35 install, I get wrong results for $page->sort.
My structure is like
Home
-level1-1
-level2-1
-level2-2
-level2-3
-level1-2
-level1-3
When I do
foreach($homepage->children as $child) {
echo $child->sort;
}
It gives me: 3, 4, 5 where it should be 0, 1, 2.
When I loop through the children's children, the values are correct
foreach($homepage->children as $child) {
foreach($child->children as $ch) {
echo $ch->sort;
}
}
returns 0, 1, 2.
On level1 there never where more than 3 pages. So I don't know why it possibly could be starting with 3 instead of 0.
Is there any way to recreate the sort index? I tried moving level1 pages around in admin but that didn't change anything.
EDIT: I also tried $homepage->children('sort=sort'). Same results.