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.

Comments

alexpott’s picture

Status: Active » Needs review
StatusFileSize
new2.39 KB

Not the trickiest thing to fix :)

alexpott’s picture

StatusFileSize
new894 bytes
new3.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
StatusFileSize
new3.76 KB
new522 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.