- π³π±Netherlands Jan-E
Could it be that you have revisions enabled and reverted one of the groups to an earlier revision? That might lead to a corrupted tree:
See https://www.drupal.org/project/subgroup/issues/3281672#comment-14880993 π doAddLeaf & doRemoveLeaf: timestamp bug and scalability Fixed - πΊπΈUnited States aytee
@Jan-E Would you be willing to share the script to rebuild trees from scratch?
I'm encountering challenges when cloning a Group that is in a Tree.
- π³π±Netherlands Jan-E
Sorry, I overlooked this one. See https://gist.github.com/Jan-E/20218ef0b471756e0075287d3df761bc
Very unedited and only applicable with our structure: project = tree, case = subgroup, session = subsubgroup.
The idea is that you loop through the trees, loop through the subgroups below it, loop though the subsubgroups below the subgroups, start counting and formulate the queries to re-initialize all left & right values. With the argument tfr-rebuild-trees.php?execute=1 you execute all the queries.
db_left and db_right are the values from the database, sb_left and sb_right is what they should be. If they differ the query will bolded. See screenshot, made on my iPad. With no differences, because it was a long time agon that I had a corrupt tree.