I'm using Drush 8, Drupal 7 and CiviCRM 4.7.18
The civicrm.drush.inc
file that comes with CiviCRM (and is moved to ~/.drush/
) has a call to a function called module_enable() which is not defined anywhere.
Error: Call to undefined function module_enable() in drush_civicrm_install() (line 367 of /root/.drush/civicrm.drush.inc) #0 [error]
phar:///usr/local/bin/drush/includes/command.inc(422): drush_civicrm_install()
#1 phar:///usr/local/bin/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#2 phar:///usr/local/bin/drush/includes/command.inc(199): drush_command()
#3 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#4 phar:///usr/local/bin/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#5 phar:///usr/local/bin/drush/includes/startup.inc(458): drush_main()
#6 phar:///usr/local/bin/drush/includes/startup.inc(365): drush_run_main(false, '/', 'Phar detected. ...')
#7 phar:///usr/local/bin/drush/drush(114): drush_startup(Array)
#8 /usr/local/bin/drush(10): require('phar:///usr/loc...')
#9 {main}.
Error: Call to undefined function module_enable() in /root/.drush/civicrm.drush.inc on line 367 #0 phar:///usr/local/bin/drush/includes/command.inc(422): drush_civicrm_install()
#1 phar:///usr/local/bin/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#2 phar:///usr/local/bin/drush/includes/command.inc(199): drush_command()
#3 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#4 phar:///usr/local/bin/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#5 phar:///usr/local/bin/drush/includes/startup.inc(458): drush_main()
#6 phar:///usr/local/bin/drush/includes/startup.inc(365): drush_run_main(false, '/', 'Phar detected. ...')
#7 phar:///usr/local/bin/drush/drush(114): drush_startup(Array)
#8 /usr/local/bin/drush(10): require('phar:///usr/loc...')
#9 {main}
Error: Call to undefined function module_enable() in drush_civicrm_install() (line 367 of /root/.drush/civicrm.drush.inc).
Drush command terminated abnormally due to an unrecoverable error.
Changing it to drush_module_enable ends in another error:
Drupal\Core\Extension\MissingDependencyException: Unable to install modules civicrm due to missing modules civicrm. in [error]
/opt/compucorp/core/lib/Drupal/Core/Extension/ModuleInstaller.php:85
Stack trace:
#0 /opt/compucorp/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(83): Drupal\Core\Extension\ModuleInstaller->install(Array,
true)
#1 phar:///usr/local/bin/drush/commands/core/drupal/environment.inc(131): Drupal\Core\ProxyClass\Extension\ModuleInstaller->install(Array,
true)
#2 phar:///usr/local/bin/drush/commands/core/drupal/environment.inc(198): drush_module_install(Array)
#3 /root/.drush/civicrm.drush.inc(367): drush_module_enable(Array)
#4 phar:///usr/local/bin/drush/includes/command.inc(422): drush_civicrm_install()
#5 phar:///usr/local/bin/drush/includes/command.inc(231): _drush_invoke_hooks(Array, Array)
#6 phar:///usr/local/bin/drush/includes/command.inc(199): drush_command()
#7 phar:///usr/local/bin/drush/lib/Drush/Boot/BaseBoot.php(67): drush_dispatch(Array)
#8 phar:///usr/local/bin/drush/includes/preflight.inc(66): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#9 phar:///usr/local/bin/drush/includes/startup.inc(458): drush_main()
#10 phar:///usr/local/bin/drush/includes/startup.inc(365): drush_run_main(false, '/', 'Phar detected. ...')
#11 phar:///usr/local/bin/drush/drush(114): drush_startup(Array)
#12 /usr/local/bin/drush(10): require('phar:///usr/loc...')
#13 {main}