- 🇦🇺Australia acbramley
Encountered this too, the order of the children rows does not match their weight.
The children form does have a #weight element, but it's set to the delta from the children. The order of the children from
$storage->findChildren
is based on the left_pos, not the weight.Even if the #weight element was set to the correct weight, the elements still need sorting (since findChildren does not return items in the correct order).
I will work on a failing test for this.
- 🇦🇺Australia acbramley
I'm trying to reproduce this in a test but I'm not able to. This popped up for us during a migration. Running the rebuild tree drush command has fixed it though so I'm a bit confused if/how to get it failing in a test.