Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
When exporting configuration in 8.3.x, a value for `profile` gets added to `core.extension.yml`. However, attempting to use `config_installer` with a configuration set that includes the `core.extention.profile` value causes the configuration to fail validation:
The configuration cannot be imported because it failed validation for the following reasons:
Cannot change the install profile from config_installer to once Drupal is installed.
Comments
Comment #2
dobrzyns CreditAttribution: dobrzyns commentedI was able to resolve this issue by also setting the install profile to config_installer in settings.php
Comment #3
ericras CreditAttribution: ericras commentedSetting $settings['install_profile'] = 'config_installer'; doesn't work for me.
This seems to be introduced by #2156401: Write install_profile value to configuration and only to settings.php if it is writeable
http://cgit.drupalcode.org/drupal/commit/core/lib/Drupal/Core/EventSubsc...
This only occurs when core.extension.profile = config_installer and I try to install in the browser. It works with core.extension.profile = standard. However, I seem to need that set to config_installer to also install multisites with drush.
Comment #4
GaëlGI had the same problem. A workaround is to temporarily comment out the line in ConfigImportSubscriber.php:
Then you can uncomment, next imports work fine.
Comment #5
jonnyeom CreditAttribution: jonnyeom as a volunteer commentedCommenting out the check as #4 stated does bypass this error. I got this error with while trying to add/install another site (multisite setup) using the GUI.
The problems seems to be that even though the new site will share the core.extension in the config directory, drupal is checking the existing core.extension.profile with NULL (since the site has not been setup yet).
Comment #6
imre.horjanHi, here's a workaround and my suggested solution to solve this in core: https://www.drupal.org/node/2867834#comment-12102407
Comment #7
andypostSteps
1. install drupal
drush si minimal
2. export config
drush cex
3. try re-install
drush si config_installer config_installer_sync_configure_form.sync_directory=sites/default/files/config_.../sync
4. expected install but but receive exception
The only way to reinstall again is remove line
$settings['install_profile'] = 'minimal';
fromsettings.php
Very probably issue in drush (8.1.12) that still adds install profile to settings.php
Comment #8
Julfabre CreditAttribution: Julfabre commentedIt's seems to be a duplicated issue with this one https://www.drupal.org/node/2729243
Comment #9
andypost