Unwanted entity_form_display entities created when updating to 2.0.0-beta1

Created on 11 May 2023, over 1 year ago
Updated 19 July 2023, about 1 year ago

Problem/Motivation

When updating from 8.x-1.3 to 2.0.0-beta1, after the update hooks run and we run config export, we noticed that there were many seemingly unnecessary and unwanted entity_form_display entities that were created.

In our particular case, we have an inordinate number of content types (236). We also have 14 entity_form_mode entities defined for nodes. At the end of the update hook, we end up with 236 * 14 = 3304 new entity_form_display config entities, eg. core.entity_form_display.node.<bundle>.<form_display>.yml, which before running the update we did not have.

We don't want all the new entity_form_display config entities. Are they necessary for the new versions of scheduler and scheduler_content_moderation_integration?

Steps to reproduce

  • Install out of the box Drupal 9.5
  • Install scheduler and scheduler_content_moderation_integration at version 8.x-1.3
  • Export config
  • Update to scheduler 2.0.0-rc8 and scheduler_content_moderation_integration 2.0.0-beta1, run the update hooks
  • Export config

Expected result

No new entity form displays.

Actual result

New entity_form_display config entites are created, reflected in the config export.

Proposed resolution

Form modes that aren't already being used for a particular bundle, including default view modes, should be ignored by the scheduler and scheduler_content_moderation_integration update hook.

Remaining tasks

  • Verify the new entity_form_displays being created are unintentional
  • If unintentional and serve no practical purpose, fix the update hooks

User interface changes

None

API changes

None

Data model changes

Extra entity_view_display's are not created.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇨🇦Canada m4olivei Grimsby, ON

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

Comments & Activities

Production build 0.71.5 2024