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.

Files: 
CommentFileSizeAuthor
#4 2091615.4.patch4.55 KBalexpott
PASSED: [[SimpleTest]]: [MySQL] 59,122 pass(es).
[ View ]
#2 2091615.2.patch0 bytesalexpott
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion.
[ View ]
#1 2091615.test-only.patch1.7 KBalexpott
FAILED: [[SimpleTest]]: [MySQL] 58,846 pass(es), 0 fail(s), and 1 exception(s).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new1.7 KB
FAILED: [[SimpleTest]]: [MySQL] 58,846 pass(es), 0 fail(s), and 1 exception(s).
[ View ]

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

StatusFileSize
new0 bytes
FAILED: [[SimpleTest]]: [MySQL] Setup environment: Test cancelled by admin prior to completion.
[ View ]

And here is a patch that explores option 1.

Issue tags:+Configuration system

StatusFileSize
new4.55 KB
PASSED: [[SimpleTest]]: [MySQL] 59,122 pass(es).
[ View ]

Okey-dokey... doh

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.

This would be fixed by #2090115: Don't install configuration when it has a soft-dependency on a module that's not installed. I'm wondering whether we want to add the special-case for profiles here, or wait for that issue.

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