While testing #1808248: Add a separate module install/uninstall step to the config import process I was running a test where I was getting a config export of the standard installation profile, setting up a new drupal install on minimal, and then trying to do a config import of the standard profile YAML files.

Because we have standard: '1000' inside the system.module.yml when we come to do a config import it tries to enable the module 'standard'.
We can get around the module enable issue by filtering out any install profiles in the function that enables all the modules that need to be enabled, but that doesn't feel quite right.

Additionally, after running the config import, it still shows system.module as having config changes that need to be imported, and doing a diff between the staging and active directories, shows that is because it still thinks 'standard' needs to be imported.

Maybe it would be a better idea to have a system.profile.yml file, which included just the installation profile. This would perhaps get around the config import issues, and it may make more sense, given that standard is a profile, and not a module?

Comments

Issue tags:+Configuration system

@tayzlor I noticed that you've mentioned importing the standard profile YAML files on a minimal install in a couple of places:

#1808248-36: Add a separate module install/uninstall step to the config import process
#1918926-3: Module dependencies are not respected when default configuration is imported

However, @tim.plunkett notes that this might be a supported use case:

#1918926-5: Module dependencies are not respected when default configuration is imported

If we are not going to support that operation, I definitely agree that we need a more helpful error message than:

Drupal\Component\Plugin\Exception\PluginException: The plugin (comment_publish_action) did not specify an instance class. in Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (line 62 of /home/user/Sites/drupal8/core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php)

Perhaps we could just add a check for matching install profiles and throw a more helpful error message if they do not match?

Issue summary:View changes
Status:Active» Closed (won't fix)

The precondition in the OP can be simplified into this statement:

I exported my configuration on site A (using installation profile Foo) and tried to import it on a completely independent site Z (using installation profile Bar).

However, that is not a supported operation — you may only synchronize configuration between instances of the same site, whereas "same site" means a "clone" of the site.

Related issues:

#2133325: Create a site UUID on install and only allow config sync between sites with the same UUID
#1613424: Allow a site to be installed from existing configuration

Therefore, I'm going to close this issue for now. However, please re-open this issue (or create a more focused one) if there is a more detailed problem/error regarding installation profiles involved.