-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
As of #1921 and Drush 9, it's impossible to install a site using the config-dir parameter and any profile other than minimal.
This was apparently an intentional change to fix problems with UUID changes and content imports, but it had the side effect of basically breaking any profile other than minimal.
The problem is that once a site is installed with a given profile, you generally cannot change that profile via a configuration import. Attempting to do so results in all sorts of error messages like this:
Drupal\Core\Config\ConfigImporterException: There were errors validating the config synchronization. in Drupal\Core\Config\ConfigImporter->validate() (line 728 of /var/www/foo/docroot/core/lib/Drupal/Core/Config/ConfigImporter.php).
[error] The import failed due to the following reasons:
Unable to install the bar module since it does not exist.
Cannot change the install profile from foo to minimal once Drupal is installed.
Furthermore, when Drush forces the install profile to be minimal, that overwrites any value of $settings['install_profile']in settings.php to also be minimal. This could cause all kinds of problems. For instance, on read-only file systems, the install will completely fail. For other file systems, it will prevent you from changing to any other install profile, even if the config-import were successful. In fact, this might actually be what's generating the error message above (note that it's trying to change from a custom profile back to minimal for some reason).
I definitely think the original issue in #1921 needs to be solved, but not by forcing the install profile to be minimal. It's something that likely needs to be fixed upstream in Drupal core.