If you add a "provision_drupal_config" hook to your aegir/drush system, when provision install is run, it will fail.

The offending code is in the " _provision_drupal_create_settings_file($url = NULL)" function in provision/platform/provision_drupal.drush.inc

  $options['extra_config'] = "# Extra configuration from modules:\n";
  foreach (drush_command_implements('provision_drupal_config') as $module) {
    $options['extra_config'] .= "# -- $module settings --\n";
    $options['extra_config'] .= module_invoke($module, 'provision_drupal_config', $url) . "\n";
  }

This fails because module_invoke is not available. Also, $options is not passed to the hook implementation - which it should be.

There is a similar function for apache configuration files "_provision_apache_create_vhost_config($url, $template = NULL)" in "web_server/provision_apache.drush.inc". That one works fine.

I've taken that format and created a patch for "_provision_drupal_create_settings_file".

The patch is attached and is verified to work on my system.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

anarcat’s picture

Status: Patch (to be ported) » Needs review

Patch looks fine to me, but it needs testing. Also, not sure why it's mark "needs to be ported".

Anonymous’s picture

Status: Needs review » Fixed

The patch was not made from the root of the Provision module (it was made from the user's home dir) and ideally it should be made against the current code in HEAD (it created some fuzz, but not conflicts, as this file has also had changes made around the same spot in HEAD).

However, I have tested it with a dummy provision extension and it works as expected. Committed, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 4c2121f on debian, dev-dns, dev-envobject, dev-koumbit, dev-log_directory, dev-migrate_aliases, dev-multiserver-install, dev-newhooks, dev-nginx, dev-platform_management, dev-ports, dev-purgebackup, dev-restore, dev-services, dev-simplerinstaller, dev-site_rename, dev-ssl, dev_716166_apache_conf, dev_dns, dev_server_verify, prod-koumbit, ssl, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x authored by mig5:
    #629042 by willieseabrook - fix invocation of provision_drupal_config...