Problem/Motivation

Entity displays depend on the bundle entity if there is one. If there is not they should depend on the provider of the entity type so they are removed when that module is uninstalled.

Proposed resolution

Fix Drupal\entity\EntityDisplayBase::calculateDependencies to add the dependency.

Remaining tasks

  • Write patch
  • Review

User interface changes

None

API changes

Additional dependencies in entity displays.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott’s picture

Status: Active » Needs review
FileSize
2.39 KB

Not the trickiest thing to fix :)

alexpott’s picture

FileSize
894 bytes
3.79 KB

Forgot to update the default configuration in standard profile. This shows why I missed this - because user is a required module and therefore I didn't notice entity.view_display.user.user.default was missing an obvious dependency on the user module but aggregator provides an entity type without a bundle entity type so that's why I noticed whilst looking at #2261425: Streamline aggregator's entities rendering with rest of core

Berdir’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
3.76 KB
522 bytes

Looks good, verified that all default form and view displays have correct dependencies. Just fixed a missing newline at the end of one of those files.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

  • Commit 3e7383d on 8.x by catch:
    Issue #2261677 by alexpott, Berdir: Entity displays need to depend on...

Status: Fixed » Closed (fixed)

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