-
-
Notifications
You must be signed in to change notification settings - Fork 403
Description
Description
In the Rock UI, a Named Location cannot be set as its own parent. However, it can be set as its own child. When this happens the entire tree disappears from the Locations list, which in turn means that the problem cannot be solved without resorting to SQL. This appears to be a wrinkle on a bug that was first noted (and fixed) back in 2015 (#1255).
Actual Behavior
Consider the following tree (built in the RockRMS sandbox on 1/27/26).
We have a top-level item called "GitHub Example Top Location" and two child locations: "GH Sub-Location 1" and "GH Sub-Location 2". Now if we select the top location "GitHub Example Top Location" and set its parent to "GH Sub-Location 1" (its child location) it does not stop us. The save goes on in perpetuity and no error message is created.
However, if we re-load the page and look for the location, we see that the entire tree disappears.
The locations have not actually disappeared from the database, they just won't show in the tree. They can be found in SQL:
Expected Behavior
We found this exact error in production (RocketChat thread), so it's not hypothetical. I'm open to the best, most elegant, or most Rock-like solution. But my take is the simplest solution is just to check when a location is being saved to make sure that it's not a part of its own tree.
Steps to Reproduce
See above (actual behavior) for the screenshots or to reproduce in the RockSolidChurchDEmo sandbox.
Issue Confirmation
- Perform a search on the Github Issues to see if your bug is already reported.
- Reproduced the problem on a fresh install or on the demo site.
Rock Version
Duplicated on our production site (17.6) and in the sandbox (18.1).
Client Culture Setting
en-US