The context:

  1. I have a git repo for a Drupal 8.1.8 site.
  2. This was created using the template at: drupal-composer (whatever was in the master branch of that repo a few days ago).
  3. Composer version 1.2.0, PHP version 5.6.25-2+deb.sury.org~trusty+1, Ubuntu 16.04
  4. The repo was cloned into /var/aegir/platforms/foo-master-2e898c7, then /var/aegir/platforms/foo-master-2e898c7/web was added as a platform in Aegir.
  5. Aegir (v7.x-3.7) was used to successfully create a site on that platform, it has been verified (using the button in the Aegir UI), I also successfully used the password reset button, disabled/enabled the site and have browsed around the site's admin section. The site seems to be working correctly and without warnings or errors.
  6. Having made a few changes to the repo, /var/aegir/platforms/foo-master-51bf6c2 was cloned and the web subdirectory added to Aegir as a new platform.
  7. Aegir was used to create a new site on the new platform (created in (6)).

The Problem:

Migrating the site created in step (5) to the platform created in step (6) above fails with the following error:

PHP Fatal error: Call to undefined function drupal_get_installed_schema_version() in /var/aegir/platforms/foo-master-51bf6c2/web/core/includes/install.inc on line 80 Fatal error: Call to undefined function drupal_get_installed_schema_version() in /var/aegir/platforms/foo-master-51bf6c2/web/core/includes/install.inc on line 80 Drush command terminated abnormally due to an unrecoverable error. [31;40m[1m[error][0m Error: Call to undefined function drupal_get_installed_schema_version() in /var/aegir/platforms/foo-master-51bf6c2/web/core/includes/install.inc, line 80 The external command could not be executed due to an application [31;40m[1m[error]

The rest of the error was:

The command could not be executed successfully (returned: Deploying site from [1;32;40m[1m    [success]
[0m /var/aegir/backups/test.foo.com-20160906.140616.tar.gz Created testfoocom_0 database [1;32;40m[1m    [success]
[0m Successfully extracted the contents of [1;32;40m[1m    [success]
[0m /var/aegir/platforms/foo-master-51bf6c2/web/sites/test.foo.com Changed group ownership of files in [1;32;40m[1m    [success]
[0m /var/aegir/platforms/foo-master-51bf6c2/web/sites/test.foo.com/files to www-data Changed group ownership of private files in [1;32;40m[1m    [success]
[0m /var/aegir/platforms/foo-master-51bf6c2/web/sites/test.foo.com/private/files to www-data Changed group ownership of temp files in [1;32;40m[1m    [success]
[0m /var/aegir/platforms/foo-master-51bf6c2/web/sites/test.foo.com/private/temp to www-data Changed permissions of [1;32;40m[1m    [success]
[0m /var/aegir/platforms/foo-master-51bf6c2/web/sites/test.foo.com/drushrc.php to 640 Generated config in write(): Site Drush configuration file [1;32;40m[1m    [success]
[0m (/var/aegir/platforms/foo-master-51bf6c2/web/sites/test.foo.com/drushrc.php) Changed permissions of [1;32;40m[1m    [success]
[0m /var/aegir/platforms/foo-master-51bf6c2/web/sites/test.foo.com/drushrc.php to 440 Platforms path /var/aegir/platforms exists. [1;32;40m[1m    [success]
[0m Platforms ownership of /var/aegir/platforms has been changed to [1;32;40m[1m    [success]
[0m aegir. Platforms permissions of /var/aegir/platforms have been changed to [1;32;40m[1m    [success]
[0m 755. Platforms path /var/aegir/platforms is writable. [1;32;40m[1m    [success]
[0m Changed group ownership of [1;32;40m[1m    [success]
[0m /var/aegir/platforms/foo-master-51bf6c2/web/sites/test.foo.com/local.settings.php to www-data Changed permissions of [1;32;40m[1m    [success]
[0m /var/aegir/platforms/foo-master-51bf6c2/web/sites/test.foo.com/local.settings.php to 440 Changed permissions of [1;32;40m[1m    [success]
[0m /var/aegir/platforms/foo-master-51bf6c2/web/sites/test.foo.com/settings.php to 640 Generated config in write(): Drupal settings.php file [1;32;40m[1m    [success]
[0m (/var/aegir/platforms/foo-master-51bf6c2/web/sites/test.foo.com/settings.php) Changed permissions of [1;32;40m[1m    [success]
[0m /var/aegir/platforms/foo-master-51bf6c2/web/sites/test.foo.com/settings.php to 440 Change group ownership of [1;32;40m[1m    [success]
[0m /var/aegir/platforms/foo-master-51bf6c2/web/sites/test.foo.com/settings.php to www-data Platforms path /var/aegir/platforms exists. [1;32;40m[1m    [success]
[0m Platforms ownership of /var/aegir/platforms has been changed to [1;32;40m[1m    [success]
[0m aegir. Platforms permissions of /var/aegir/platforms have been changed to [1;32;40m[1m    [success]
[0m 755. Platforms path /var/aegir/platforms is writable. [1;32;40m[1m    [success]
[0m Found database dump at [1;32;40m[1m    [success]
[0m /var/aegir/platforms/foo-master-51bf6c2/web/sites/test.foo.com/database.sql. Database dump at [1;32;40m[1m    [success]
[0m /var/aegir/platforms/foo-master-51bf6c2/web/sites/test.foo.com/database.sql is readable Generated config in write(): Drupal sites.php file [1;32;40m[1m    [success]
[0m (/var/aegir/platforms/foo-master-51bf6c2/web/sites/sites.php) Changed permissions of [1;32;40m[1m    [success]
[0m /var/aegir/platforms/foo-master-51bf6c2/web/sites/sites.php to 644 Changed permissions of sites/test.foo.com to 755 [1;32;40m[1m    [success]
[0m Changed permissions of sites/test.foo.com/themes to [1;32;40m[1m    [success]
[0m 2775 Changed permissions of sites/test.foo.com/modules to [1;32;40m[1m    [success]
[0m 2775 Changed permissions of sites/test.foo.com/libraries to [1;32;40m[1m    [success]
[0m 2775 Changed permissions of sites/test.foo.com/files to 2770[1;32;40m[1m    [success]
[0m Changed permissions of sites/test.foo.com/files/tmp to [1;32;40m[1m    [success]
[0m 2770 Changed permissions of sites/test.foo.com/files/images [1;32;40m[1m    [success]
[0m to 2770 Changed permissions of [1;32;40m[1m    [success]
[0m sites/test.foo.com/files/pictures to 2770 Changed permissions of sites/test.foo.com/files/css to [1;32;40m[1m    [success]
[0m 2770 Changed permissions of sites/test.foo.com/files/js to [1;32;40m[1m    [success]
[0m 2770 Changed permissions of sites/test.foo.com/files/ctools [1;32;40m[1m    [success]
[0m to 2770 Changed permissions of [1;32;40m[1m    [success]
[0m sites/test.foo.com/files/imagecache to 2770 Changed permissions of [1;32;40m[1m    [success]
[0m sites/test.foo.com/files/locations to 2770 Changed permissions of sites/test.foo.com/private to [1;32;40m[1m    [success]
[0m 2770 Changed permissions of sites/test.foo.com/private/files[1;32;40m[1m    [success]
[0m to 2770 Changed permissions of sites/test.foo.com/private/temp [1;32;40m[1m    [success]
[0m to 2770 Changed permissions of sites/test.foo.com/files/styles [1;32;40m[1m    [success]
[0m to 2770 Changed permissions of [1;32;40m[1m    [success]
[0m sites/test.foo.com/private/config to 2770 Changed permissions of [1;32;40m[1m    [success]
[0m sites/test.foo.com/private/config/active to 2770 Changed permissions of [1;32;40m[1m    [success]
[0m sites/test.foo.com/private/config/sync to 2770 Changed group ownership of sites/test.foo.com/files to [1;32;40m[1m    [success]
[0m www-data Changed group ownership of sites/test.foo.com/files/tmp[1;32;40m[1m    [success]
[0m to www-data Changed group ownership of [1;32;40m[1m    [success]
[0m sites/test.foo.com/files/images to www-data Changed group ownership of [1;32;40m[1m    [success]
[0m sites/test.foo.com/files/pictures to www-data Changed group ownership of sites/test.foo.com/files/css[1;32;40m[1m    [success]
[0m to www-data Changed group ownership of sites/test.foo.com/files/js [1;32;40m[1m    [success]
[0m to www-data Changed group ownership of [1;32;40m[1m    [success]
[0m sites/test.foo.com/files/ctools to www-data Changed group ownership of [1;32;40m[1m    [success]
[0m sites/test.foo.com/files/imagecache to www-data Changed group ownership of [1;32;40m[1m    [success]
[0m sites/test.foo.com/files/locations to www-data Changed group ownership of sites/test.foo.com/private [1;32;40m[1m    [success]
[0m to www-data Changed group ownership of [1;32;40m[1m    [success]
[0m sites/test.foo.com/private/files to www-data Changed group ownership of [1;32;40m[1m    [success]
[0m sites/test.foo.com/private/temp to www-data Changed group ownership of [1;32;40m[1m    [success]
[0m sites/test.foo.com/files/styles to www-data Changed group ownership of [1;32;40m[1m    [success]
[0m sites/test.foo.com/private/config to www-data Changed group ownership of [1;32;40m[1m    [success]
[0m sites/test.foo.com/private/config/active to www-data Changed group ownership of [1;32;40m[1m    [success]
[0m sites/test.foo.com/private/config/sync to www-data Removed dump file [1;32;40m[1m    [success]
[0m /var/aegir/platforms/foo-master-51bf6c2/web/sites/test.foo.com/database.sql after restoring from it Generated config in write(): virtual host configuration file [1;32;40m[1m    [success]
[0m (/var/aegir/config/server_master/nginx/vhost.d/test.foo.com) PHP Fatal error: Call to undefined function drupal_get_installed_schema_version() in /var/aegir/platforms/foo-master-51bf6c2/web/core/includes/install.inc on line 80 Fatal error: Call to undefined function drupal_get_installed_schema_version() in /var/aegir/platforms/foo-master-51bf6c2/web/core/includes/install.inc on line 80 Drush command terminated abnormally due to an unrecoverable error. [31;40m[1m[error][0m Error: Call to undefined function drupal_get_installed_schema_version() in /var/aegir/platforms/foo-master-51bf6c2/web/core/includes/install.inc, line 80 The external command could not be executed due to an application [31;40m[1m[error][0m error. Generated config in write(): virtual host configuration file [1;32;40m[1m    [success]
[0m (/var/aegir/config/server_master/nginx/vhost.d/test.foo.com) , code: 1)

Note: this isn't the full log from Aegir, just the line from the log marked as an error. I have fixed up the formatting to be less illegible (sorry it's still pretty bad).

Does anyone know why this doesn't work, and if there is a workaround for the problem?

  • From a quick discussion with @memtkmcc on IRC (#aegir), the problem might be caused by drupal-composer. I have raised a bug report here: drupal.org/node/2796555 – user4301448 Sep 7 '16 at 15:24
  • Thinking more on this, I'm not sure drupal-composer is related, the alleged problem with drupal-composer is the non-standard directory structure (some files are held above the web root), but drupal_get_installed_schema_version() is in web/core/includes/schema.inc, hardly non-standard. – user4301448 Sep 7 '16 at 17:06

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.