Updated: Comment #0

Problem/Motivation

Installation profiles provide default config. For example, the standard profile provides editor.editor.full_html.yml which depends on the editor module because that defines the config entity and it and depends on ckeditor because that is the plugin used.

During installation this does not cause a problem because the standard profile depends on both editor and ckeditor modules.

However, in Drupal 7 the standard profile exists but the editor and ckeditor modules are not the same. If the user does not disable the standard profile after upgrading if the user enables the editor module it will crash. This is because the system tries to install the default config from the profile but ckeditor is not installed (and it can't be because it depends on editor).

Proposed resolution

Option 1

Only installation profile default config during installation.

Option 2

Detect the soft dependencies and do install.

Remaining tasks

  1. Pick a solution
  2. Write tests
  3. Write code
  4. Review

User interface changes

n/a

API changes

Option 1

Adjust ExtensionStorage to have a flag to include install profile configuration or not

Option 2

Create a config validator service that determines if all the dependencies are met including soft dependecies.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

alexpott’s picture

Status: Active » Needs review
FileSize
1.7 KB

Here's a patch that contains a test. Basically it just enables all possible modules after upgrading a D7 site that has standard enabled.

alexpott’s picture

FileSize
0 bytes

And here is a patch that explores option 1.

xjm’s picture

Issue tags: +Configuration system
alexpott’s picture

FileSize
4.55 KB

Okey-dokey... doh

catch’s picture

Priority: Major » Critical
Issue tags: +D8 upgrade path

Since this means you can hose your site by enabling a new core module after an upgrade from D7, I think it deserves to be critical.

catch’s picture

This would be fixed by #2090115: Don't install a module when its default configuration has unmet dependencies. I'm wondering whether we want to add the special-case for profiles here, or wait for that issue.

catch’s picture

Issue summary: View changes
Status: Needs review » Closed (duplicate)

Marking as duplicate of #2090115: Don't install a module when its default configuration has unmet dependencies. Feel free to re-open if you disagree.