When using the 'Compare platforms' feature available from Hostmaster when migrating or cloning a site, the results for Drupal 8 sites and platforms are incorrect, showing packages missing from the target platform that are in actuality available in it. This is caused by some problems in the 'provision/platform/provision_drupal.drush.inc' and 'provision/platform/drupal/packages_8.inc' files. The problems found are listed below.

  • Packages flagged as 'hidden' are not being properly skipped, as they are for Drupal 7.
  • The array keys for themes have '.info' appended to them. This causes them to look like different themes, when compared to those without '.info' in the key.
  • Drupal 8 modules are identified by having a '.info.yml' file. The same code is being used for Drupal 7 and Drupal 8, just identifying modules with a '.module' file, which not all child modules have, so these modules are not being found.
  • The Drupal 'drupal_get_filename()' function, when called as 'drupal_get_filename("module", "standard")', returns the path to the 'standard' profile. This is the only case found, but it could be affecting other profiles, as well.

A patch is included that corrects these problems.

CommentFileSizeAuthor
#2 d8_packages-#3089790-comment_#2.patch3.46 KBkfolsom
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kfolsom created an issue. See original summary.

kfolsom’s picture

Patch file included.

colan’s picture

Status: Active » Needs review

Thanks for this! It's definitely needed as it hasn't worked for a while.

kfolsom’s picture

Glad to help out! We're beginning to ramp up our Drupal 8 adoption, so this has become something more of our website maintainers have been interested in having fixed.

froboy’s picture

This is working well for me, however I just ran into a fun edge case... a module that declares hook_update_last_removed() does not reflect the schema in the list.

froboy’s picture

Status: Needs review » Reviewed & tested by the community

I redact my above comment as it's already filed as a separate issue: #3129188: Sites won't migrate because module uses hook_update_last_removed. With that said, this fix works great for me.

helmo’s picture

Status: Reviewed & tested by the community » Needs work

Similar code was already committed via #3149961: BOA backport so this does no longer apply since 3.19.0.