The context:
- I have a git repo for a Drupal 8.1.8 site.
- This was created using the template at: drupal-composer (whatever was in the master branch of that repo a few days ago).
- Composer version 1.2.0, PHP version 5.6.25-2+deb.sury.org~trusty+1, Ubuntu 16.04
- 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.
- 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.
- 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.
- 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 is in the attached file. 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).
Note the second: from a brief discussion with @memtkmcc on IRC, the problem may be caused by *drupal-composer* and its non-standard directory structure (if something is supported by Drupal it should work in Aegir, IMO), however the drupal_get_installed_schema_version()
function is inside the standard directory structure.
Note the third: I also created a Stack Exchange question for this.
What should happen
The correct behaviour is Aegir should migrate the site, if drupal-composer is not supported: it should be. drupal-composer provides a valid structure for a Drupal platform, and is apparently quite popular.
Comment | File | Size | Author |
---|---|---|---|
#5 | Screenshot from 2017-01-06 11-34-02.png | 14.7 KB | Liam McDermott |
#5 | aegir_d8_clone_success_plus_debug.txt | 74.82 KB | Liam McDermott |
#5 | aegir_d8_migrate_error_plus_debug.txt | 65.37 KB | Liam McDermott |
#3 | aegir_d8_clone_error.txt | 24.67 KB | Liam McDermott |
aegir_d8_error.txt | 7.77 KB | Liam McDermott |
Comments
Comment #2
Liam McDermott CreditAttribution: Liam McDermott commentedComment #3
Liam McDermott CreditAttribution: Liam McDermott commentedJust tried a clone along the same lines as the migrate described above, it generates this error message:
The weird thing about this: I can't see any error here, perhaps someone else can shed some light? The full log from the clone task is attached.
Comment #4
ergonlogicThere's only one place that function is called in Provision:
But that isn't where this is failing...
drupal_get_installed_schema_version()
is failing to be called from.../web/core/includes/install.inc
. As far as I can tell, we're succeeding with the site deployment right up until drush_provision_drupal_post_provision_deploy().It'd be useful if you could drop some debug statements just before and after
drush updatedb
is called (around line 170 inplatform/deploy.provision.inc
in Provision):Note that there's a similar bug report upstream in Drush that might be related: https://github.com/drush-ops/drush/issues/2138
Comment #5
Liam McDermott CreditAttribution: Liam McDermott commentedSorry I couldn't provide debug data sooner, we were having some other unrelated problems.
Having upgraded to Aegir 3.9 this bug appears to have been partially fixed. No longer do I get the 'Call to undefined function' error, and clone tasks appear to be working for D8 sites. There is another error during D8 migrate tasks though, and it's occurring at the same point:
(apologies for the horrendous formatting, it's what Aegir outputs)
Other information that may be useful:
Comment #6
tarek CreditAttribution: tarek as a volunteer commentedHello all,
I am also suffering this problem when attempting to migrate a D7 site to D8 via Aegir. Has there been any resolution here? Is there anything new that I can contribute to get this moving?
Thank you,
tarek : )
Comment #7
Jon PughThere is a problem with Aegir using Drush 8 on Drupal 8 sites that include drush9.
I've got a PR with drush going: https://github.com/drush-ops/drush/pull/3260