Problem/Motivation

After upgrading Drupal core to 11.4.x, choosing/enabling a display mode from the "Manage custom elements" page no longer enables that display mode for the bundle. The display mode can be selected and the form submitted with no errors, but it remains disabled — no active entity view display is created for it.

This issue is caused by a recent Drupal core update to how display modes are managed. Core issue #3564234: Add display-builder agnostic overview page for display modes, shipped in core 11.4.x (see change record), changed how display modes are enabled/disabled for a bundle — moving that functionality off the default view mode edit form and onto a new overview page.

Since custom_elements_ui's "Manage custom elements" form is built on top of that core form, it was directly affected by this update.

Steps to reproduce

  1. Install/update Drupal core to 11.4.x.
  2. Enable Custom Elements + custom_elements_ui.
  3. Go to Structure > [entity type] > [bundle] > Manage custom elements.
  4. Select a display mode to enable and save the form. — the display mode still shows as not enabled; no corresponding entity view display was created/activated.

Proposed resolution

Rebuild custom_elements_ui's display-mode enable/disable UI to mirror core's new overview page pattern introduced in #3564234 (enabled/disabled display mode tables), rather than relying on the old checkbox fieldset that used to live on

CommentFileSizeAuthor
#5 after.PNG34.7 KBangel_devoeted
#5 before.PNG37.05 KBangel_devoeted
Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

gokul.jayan created an issue. See original summary.

gokul.jayan’s picture

Status: Active » Needs review

fago made their first commit to this issue’s fork.

angel_devoeted’s picture

StatusFileSize
new37.05 KB
new34.7 KB

Tested MR !188 on Drupal 11.x (11.4.x-dev) and confirmed that enabling a display mode on the "Manage custom elements" page now works as expected, successfully creating the corresponding display and showing the status message with the configuration link.
The implementation looks solid

before:
before

after:
after

  • fago committed 2687935a on 3.x authored by gokul.jayan
    fix: #3612990 Enabling a display mode via "Manage custom elements" no...
fago’s picture

Status: Needs review » Fixed

Thank you for the review and help testing. Merged then!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • fago committed 2687935a on 3472359-custom-elements-3472359-multiple authored by gokul.jayan
    fix: #3612990 Enabling a display mode via "Manage custom elements" no...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.