Don't try to append breadcrumbs while in upgrade mode
On a drupal 7 site with civicrm_entity and views, the upgrade crashes with the symptom people have been reporting about core extensions not getting enabled, so it can't find Api4\EntityFinancialAccount
. At least on this site, it happens while it's trying to rebuild the theme registry while adding a breadcrumb. This ends up calling hook_views_data, which ends up calling civicrm_entity_entity_property_info_alter, which tries to getOptions for various civi things, which then hits this missing class since it hasn't been installed yet.
But breadcrumbs seem pointless during upgrade. Doing this works to get around the problem:
--- a/CRM/Core/Invoke.php
+++ b/CRM/Core/Invoke.php
@@ -252,7 +252,7 @@ class CRM_Core_Invoke {
CRM_Utils_System::setTitle($item['title']);
}
- if (isset($item['breadcrumb']) && empty($item['is_public'])) {
+ if (!CRM_Core_Config::isUpgradeMode() && isset($item['breadcrumb']) && empty($item['is_public'])) {
CRM_Utils_System::appendBreadCrumb($item['breadcrumb']);
}
Might need some testing on other cmses.