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.

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

mogtofu33 created an issue. See original summary.

mogtofu33’s picture

Assigned: mogtofu33 » pdureau
Status: Needs work » Needs review

  • mogtofu33 committed bd084adc on 1.0.x
    fix: #3631054 Page layouts and entity view displays miss config...
mogtofu33’s picture

Assigned: pdureau » Unassigned
Status: Needs review » Fixed

Had a new review and working as expected, safe to merge.

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.

pdureau’s picture

Status: Fixed » Closed (fixed)