#106516Backend record edit of category records allows setting child categories as parent categories (circular dependency)
Description
Backend record edit of category records allows setting child elements as parent elements and therefore creating a loop which results in those categories and their subcategories not being rendered.
Found in v11 and verified in v14.
How to reproduce:- Create two categories
Screenshot%202025-04-07%20at%2015.23.26.png - Edit category BBB and set category BBB to be child of AAA
Screenshot%202025-04-07%20at%2015.30.20.png - Edit category AAA and set category AAA to be child of BBB
Screenshot%202025-04-07%20at%2015.33.03.png - After saving the categories disappear due to obvious display issues of circular dependencies
Screenshot%202025-04-07%20at%2015.34.09.png
To show the categories again, one of the categories needs to update their parent category.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Files 4
History 2
-
Oliver Bartsch changed Duplicates #91608 <span data-processor="relativetime" data-value="2026-10-26T08:35:17+00:00" > 10/26/26, 08:35 </span>
-
Oliver Bartsch commented and changed status
NewClosed <span data-processor="relativetime" data-value="2026-10-26T08:35:18+00:00" > 10/26/26, 08:35 </span>
Hey,
thanks for the detailed report and the screenshots. I can confirm this on main. For a tree that points to its own table, the tree data provider only marks the record you are editing as unselectable. Its children and grandchildren can still be picked as “Parent”, and DataHandler does not check for cycles when saving. Once AAA and BBB point at each other, no parent chain leads back to the tree root, so both categories and everything below them drop out of every category tree.
This is the same problem as #91608, which is already Under Review, so I’m closing this one as a duplicate and we’ll continue there. I think the patch needs an update so the parent tree also marks all descendants of the edited record as unselectable. A server-side cycle check in DataHandler would be a separate follow-up.
Cheers, Oli