Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Impossible to site-install --config-dir with any profile other than minimal #2953
As of #1921 and Drush 9, it's impossible to install a site using the
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:
Furthermore, when Drush forces the install profile to be
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.
Shoot, I spent quite a bit of time figuring out how to make this work some time ago, but now I can't remember exactly what was necessary.
The reason I can't remember is that I decided it wasn't worth the complexity, when the config installer profile exists (and hopefully someday is heading to core). Now, I just use config installer, which works with any profile.
It looks like the Config Installer profile makes an exception and scans the directory of the profile listed in core.extensions.yml for extensions in addition to the regular places Drupal would look for extensions.
Unfortunately, if your site is using the core patch to allow for inherited profiles, there might be more than one profile directory that contains extensions to be enabled. And the Config Installer profile will fail during install because it can't find those extensions.
I wouldn't expect Config Installer to be making that exception for parent profiles, just noting that it won't work with a profile like Lightning that contains extensions and is generally used as a base profile.
referenced this issue
Oct 9, 2017
I'd love some guidance from folks about how to proceed.
IIRC, the forcing of 'minimal' came after a steady stream of support requests from people trying to use --config-dir with standard profile. They were getting something like 'shortcut content must be deleted' before import'
Well ideally we'd have https://www.drupal.org/node/2788777 in core and we'd just move https://www.drupal.org/project/install_profile_generator into core drush and then people could create their own install profiles.
Basically config import was not designed to work the way drush is using it. A potential solution would be for drush to install minimal, delete all config entities, swap the profile to the one from config, and then do the config import.
For those trying to solve the problem of installing a site from config, the Configuration installer profile works quite nicely. I've tested and documented our usage of it here: http://lightning.acquia.com/blog/using-configuration-installer-lightning
Ultimately, I think this is the parent issue https://www.drupal.org/project/drupal/issues/1613424