-
Notifications
You must be signed in to change notification settings - Fork 428
Open
Labels
Description
- Lunar version: 1.0.0-beta21
- Laravel Version: 12.19.3
- PHP Version: 8.3.22
- Database Driver & Version: MySQL 8.0.42
Expected Behaviour:
When creating and managing nested collections, the breadcrumb and ancestor structure should remain consistent. Removing and creating sub-collections should not corrupt the nested set hierarchy.
Actual Behaviour:
After deleting and creating sub-collections, the ancestor tree becomes corrupted: breadcrumbs start displaying incorrect paths, sometimes including sibling collections or even descendants of siblings. Looking at the database reveals that _lft
and _rgt
values are no longer valid.
Steps To Reproduce:
- Create 3–4 parent collections (e.g. A, B, C).
- Under each collection, create 4–5 sub-collections.
- Delete 2–3 sub-collections from multiple parent collections (not just one).
- Then create 2–3 new sub-collections (again under different parents).
- Go to the admin panel and view the breadcrumbs or use the
ancestors()
method. - Notice that the breadcrumb includes incorrect parent paths — e.g. shows siblings or their children instead of true ancestors too.
- Inspect the
_lft
and_rgt
values in the database — they are out of sync and appear incorrect.