From 2c17384c6e3ded24eca99db444066c31ea671151 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Mon, 6 Jul 2020 01:18:49 -0700 Subject: [PATCH] FlushDrupal.civi-setup.php - Update to work with setup UI --- setup/plugins/installDatabase/FlushDrupal.civi-setup.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup/plugins/installDatabase/FlushDrupal.civi-setup.php b/setup/plugins/installDatabase/FlushDrupal.civi-setup.php index d761cb7a33..ef2bb25cc2 100644 --- a/setup/plugins/installDatabase/FlushDrupal.civi-setup.php +++ b/setup/plugins/installDatabase/FlushDrupal.civi-setup.php @@ -16,6 +16,13 @@ if (!defined('CIVI_SETUP')) { } \Civi\Setup::log()->info(sprintf('[%s] Flush CMS metadata', basename(__FILE__))); + // If the admin activated the module first, and then ran web-based installer, + // then some hooks (eg hook_menu) may not fire until we fix this flag. + $initialized = &drupal_static('civicrm_initialize', FALSE); + $failure = &drupal_static('civicrm_initialize_failure', FALSE); + $initialized = TRUE; + $failure = FALSE; + system_rebuild_module_data(); module_enable(array('civicrm', 'civicrmtheme')); drupal_flush_all_caches(); -- 2.25.1