From ec3d5dff0c855a88883c3ad76b402946b79141bf Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Fri, 3 Jul 2020 21:44:14 -0700 Subject: [PATCH] FlushBackdrop.civi-setup.php - Update to work with setup UI --- setup/plugins/installDatabase/FlushBackdrop.civi-setup.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/setup/plugins/installDatabase/FlushBackdrop.civi-setup.php b/setup/plugins/installDatabase/FlushBackdrop.civi-setup.php index 90a6df7174..1d2f862a50 100644 --- a/setup/plugins/installDatabase/FlushBackdrop.civi-setup.php +++ b/setup/plugins/installDatabase/FlushBackdrop.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 = &backdrop_static('civicrm_initialize', FALSE); + $failure = &backdrop_static('civicrm_initialize_failure', FALSE); + $initialized = TRUE; + $failure = FALSE; + system_rebuild_module_data(); module_enable(array('civicrm', 'civicrmtheme')); backdrop_flush_all_caches(); -- 2.25.1