Fork of D8 distribution will not verify
I'm getting this when trying to verify a Drupal 8 distribution.
Drush could not bootstrap the platform at /var/aegir/projects/thunder2/test/docroot. Please check the platform directory exists and is readable. The errors were: DRUSH_NO_SITE: We could not find an applicable site for that command.
I created a fork of the distribution and made a few modifications from the devshop composer template to the composer.json included with the distro -
https://github.com/gusaus/thunder-distribution/blob/99f495387587529710de7a637e01cf2d009595b2/composer.json
In hindsight I'm not sure if I'm supposed to include the entire composer.json or merge somehow? https://github.com/opendevshop/devshop-composer-template/blob/8.x/composer.json
Thanks for the report @gusaus :)
Ideally the two would be merged.
It looks to me as if @jonpugh 's hunch was spot on.
Check out the scripts section of the https://github.com/opendevshop/devshop-composer-template/blob/8.x/composer.json
As Jon mentioned in Gitter, you're going to want to have "@composer drupal:scaffold" under "post-install-cmd" and "post-upgrade-cmd", as in the devshop-composer-template composer.json. This will build out your docroot directory on composer install.
I believe you'll also want to add "drupal-composer/drupal-scaffold": "^2.5", to your require section in order for the scaffolding to take place
@gusaus You can't use an install profile repo as a drupal site repo. The install profile is just like a module, it will be included in your site if you put it in require.
Clone the devshop-composer-template, push it to your own repo, then:
composer require drupal/thunder
Then commit the changed composer.json and composer.lock files.
Then you should be able to install.
Thanks @caldenjacobs and @jonpugh. I'm new to composer, so assuming this isn't quite right. I added Thunder to composer require https://github.com/gusaus/thunder-devshop/blob/master/composer.json#L28
I also changed the intaller-paths to docroot https://github.com/gusaus/thunder-devshop/blob/cecdc900fb80758be8592dbc118bf84ad4068c2f/composer.json#L78 in order to match the structure for Thuder https://github.com/gusaus/thunder-devshop/blob/cecdc900fb80758be8592dbc118bf84ad4068c2f/composer.json#L78
I'm now able to verify the platform and project but I'm getting this type of message during install -
Undefined variable: config install_8.inc:113
Drush command terminated abnormally due to an unrecoverable error.
Any idea what that might be?
Hmm, I think it might be thunder itself.
It seems to have loaded all of Drupal core, actually.
Ok, the drupal/thunder composer isn't really setup right as a drupal-project distribution, but you can use burdamagazinorg/thunder ...
However after that install fails because of Aegir black magic. There is something about certain install profiles are setup that breaks on aegir because the site gets bootstrapped too early, or something like that.
It's time to go in for surgery. The way Drupal is installed with Provision is the major design flaw in Aegir. Fixing that will fix this.
@gusaus it's time to get organized to fix this problem. There's a lot of people interested in doing the work, maybe we can get some to throw in some cash.
There is something about certain install profiles are setup that breaks on aegir because the site gets bootstrapped too early, or something like that.
Probably reaching here, but could this issue be related? https://www.drupal.org/project/drupal/issues/1356276
Main reason I'm wondering is there's a patch included in University.... https://github.com/front/university-project/blob/d30af75335fe64f1aec035b59bb9984846942068/composer.json#L92
...a distribution that also requires thunder https://github.com/front/university-project/blob/d30af75335fe64f1aec035b59bb9984846942068/composer.json#L44
it's time to get organized to fix this problem. There's a lot of people interested in doing the work, maybe we can get some to throw in some cash.
Might be time to make better use of https://opencollective.com/aegir?
Testing out https://github.com/opendevshop/composer-distro-test-thunder and getting the following errors -
| Undefined variable: config install_8.inc:112 | - | notice |
|---|---|---|
| Undefined variable: config install_8.inc:113 | - | notice |
| DRUPAL_INSTALL_FAILED |
Drupal\Core\Config\StorageException: Write operation is not allowed. in /var/aegir/projects/thunderdevshop/thunder/web/core/lib/Drupal/Core/Config/InstallStorage.php:104 Stack trace: #0 /var/aegir/projects/thunderdevshop/thunder/web/core/lib/Drupal/Core/Config/Config.php(226): Drupal\Core\Config\InstallStorage->write('system.file', Array) #1 /var/aegir/.drush/commands/provision/platform/drupal/install_8.inc(158): Drupal\Core\Config\Config->save() #2 /var/aegir/.drush/commands/provision/platform/drupal/install_8.inc(171): install_main() #3 /var/aegir/projects/thunderdevshop/thunder/vendor/drush/drush/includes/drush.inc(78): include_once('/var/aegir/.dru...') #4 /var/aegir/projects/thunderdevshop/thunder/vendor/drush/drush/includes/engines.inc(520): drush_include('/var/aegir/.dru...', 'install') #5 /var/aegir/.drush/commands/provision/platform/provision_drupal.drush.inc(92): drush_include_engine('drupal', 'install') #6 /var/aegir/projects/thunderdevshop/thunder/vendor/drush/drush/includes/command.inc(422): drush_provision_drupal_provision_install_backend() #7 /var/aegir/projects/thunderdevshop/thunder/vendor/drush/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array) #8 /var/aegir/projects/thunderdevshop/thunder/vendor/drush/drush/includes/command.inc(199): drush_command() #9 /var/aegir/projects/thunderdevshop/thunder/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array) #10 /var/aegir/projects/thunderdevshop/thunder/vendor/drush/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch() #11 /var/aegir/projects/thunderdevshop/thunder/vendor/drush/drush/drush.php(12): drush_main() #12 {main}
Assuming this is an issue with the Thunder installation profile since the other profiles (like standard drupal or demo) seem to work?
Yes, there is some kind of chicken and egg situation there: the Thunder code is trying to run before the settings.php is configured.
I've seen this before with certain install profiles, but it was a long time ago. I don't remember the fix, but:
- Running with a debugger helped me figure it out, i think
- The provision4 initiative will make this issue obsolete, because the install script will be the responsibility of the install profile (drush site-install or whatever)
So is this patch referenced by @omega8cc part of a potential solution? https://github.com/omega8cc/drush/commit/b9257ea97593443b37763a1eddd0096c20167fa1
The provision4 initiative will make this issue obsolete, because the install script will be the responsibility of the install profile (drush site-install or whatever)
Is this the proposed solution? If so, is there an issue and/or Open Collective goal where we can send contributors?
This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!
Closing this. Create additional issues for actionable bug reports.