Problem/Motivation
A page layout installed from configuration is saved before its instance exists, so PageLayout::calculateDependencies() skipped its sources. It declared no dependency on the theme or modules they use, and stayed when they were uninstalled. EntityViewDisplayTrait::calculateDependencies() stops the same way without an instance, and never declares its profile.
Proposed resolution
Read the contexts from the buildable, not from the instance, in both. Declare the profile, and the override profile, of an entity view display as a page layout declares its profile.
Remaining tasks
- Entity view display fix and its kernel test.
- Review.
User interface changes
None.
API changes
None.
Data model changes
None. A display saved before the fix gets its dependencies on its next save: no post update.
Issue fork display_builder-3631054
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
Comment #3
mogtofu33 commentedComment #5
mogtofu33 commentedHad a new review and working as expected, safe to merge.
Comment #7
pdureau commented