Library dependencies need to be improved to ensure proper order of loading

Created on 2 April 2025, 7 days ago

Problem/Motivation

Since Drupal 10.4.0 release, the ordering of the assets to load on a page relies only on the libraries dependencies definition.
See https://www.drupal.org/node/3473558 .
If required libraries are not properly defined as dependencies, it can result in broken feature.
On one of our project we have an issue with the ordering of fields on form display if using field group.
In the console the following error appears on page load:

If changing the order through drag and drop and save the changes are not saved.

Drupal.fieldUIDisplayOverview does not contain the 'group' rowHandler.

Steps to reproduce

Update to Drupal >= 10.4.0 (for us 10.4.5).
Use field groups in a form display.
Try to order the field by drag and drop and save => order change is not saved.

Proposed resolution

Add the - field_ui/drupal.field_ui library as dependency instead of attaching it during render. (See MR)

Remaining tasks

Probably other libraries are affected too and should be properly reviewed.

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇫🇷France GuillaumePacilly

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

Comments & Activities

Production build 0.71.5 2024