- Issue created by @Grevil
- Merge request !120Issue #3538795: Child fields moved from disabled groups retain parent relationship → (Open) created by Grevil
- 🇩🇪Germany Grevil
🐛 Drag and drop acts weird, sometimes not resetting the parent, or even clearing the region value Needs review suggests using the patch in 🐛 Tabledrag is resetting the region value if items are nested Needs work , but this doesn't do the trick and here is why:
I think, the MAIN problem is, that Drupal core nor field_group have any logic, when the parent changes. Neither when manually setting the parent or drag and dropping. Inside "onChange, in drupal cores field_ui, "regionChange" is being called, when the region changes and the same happens inside "onDrop" (for the drag and drop behavior).
But there isn't any logic for when we manually (or via drag and drop) change the parent.
In Drupal core, this doesn't matter, changing the parent without field_group enabled and saving, simply resets the parent again and that is fine, since there is no "real" parent logic in Drupal core. Only regions. But field_group heavily relies on the parents.
This seems like a regression in core, but I couldn't find the proper issue yet. Basically, core should provide the same logic as with changeRegion, or we need to manually implement it in field_group.
- 🇩🇪Germany Grevil
Ok, parts of this issue need to be addressed in core, see 🐛 Field UI: Parent-child relationships not properly updated when fields are moved via drag-and-drop Active .
- 🇩🇪Germany Grevil
Alright, that's it! Unfortunately, this change won't do anything as long as 🐛 Field UI: Parent-child relationships not properly updated when fields are moved via drag-and-drop Active is not merged, so I'll postpone this issue. For now.
Feel free to use the attached patch in combination with the core patch from https://www.drupal.org/files/issues/2025-07-31/3539083-field-ui-parent-c... → , to test the fixes!