Field UI: Parent-child relationships not properly updated when fields are moved via drag-and-drop

Created on 31 July 2025, 2 days ago

Problem/Motivation

When using the Field UI Manage Display interface with the contrib Field Group module enabled, moving child fields from their parent groups to the "ground level" (content region) via drag-and-drop does not properly update the parent-child relationship. The field appears visually at the ground level, but programmatically still retains its disabled group as its parent.

The root cause is that Drupal core's field_ui.js only handles region changes through the regionChange() method, but lacks equivalent logic for parent changes. When a field is dragged to a different parent or to ground level, the onChange() and onDrop() methods only check for region changes but ignore parent relationship updates.

So why not a dedicated field_group issue?

The field group module is very special, as some core functionalities only exist, to make the field_group even possible. One of these things is the existence of the "parent" select in the "Manage form / view display" and the general logic of a "parent" on form / view display.
There is even an issue on trying to delete this functionality, see 🐛 Parent setting on Form display cannot be changed for custom Content type Needs review . That's why I think this functionality should also be merged into core (or even the whole "field_group" module should be part of core through Add field grouping to core Needs work ).

Steps to reproduce

  1. Install and enable the Field Group module
  2. Go to Structure > Content types > [Any content type] > Manage display
  3. Create a field group and add some fields to it
  4. Drag a child field from the field group to the "ground level" (content region)
  5. Observe that the field appears visually at ground level
  6. Check the form data or save and reload - the field still has the group as its parent

Proposed resolution

Add parent change detection and handling to the field_ui.js file.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

11.0 🔥

Component

field_ui.module

Created by

🇩🇪Germany Grevil

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024