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
Comment #1
mtift@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:
Perhaps we could just add a check for matching install profiles and throw a more helpful error message if they do not match?
Comment #2
sunThe precondition in the OP can be simplified into this statement:
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: [META] 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.