diff --git a/CRM/Core/Resources/Common.php b/CRM/Core/Resources/Common.php index 10485234af0129c7b78c577657cd4ed0c2c51ea7..68b2704632df110308624e698787b2e5142fd60d 100644 --- a/CRM/Core/Resources/Common.php +++ b/CRM/Core/Resources/Common.php @@ -205,18 +205,20 @@ class CRM_Core_Resources_Common { ]; // Dynamic localization script - $items[] = Civi::service('asset_builder')->getUrl('crm-l10n.js', [ - 'cid' => $contactID, - 'includeEmailInName' => (bool) $settings->get('includeEmailInName'), - 'ajaxPopupsEnabled' => (bool) $settings->get('ajaxPopupsEnabled'), - 'allowAlertAutodismissal' => (bool) $settings->get('allow_alert_autodismissal'), - 'resourceCacheCode' => Civi::resources()->getCacheCode(), - 'locale' => CRM_Core_I18n::getLocale(), - 'lcMessages' => $settings->get('lcMessages'), - 'dateInputFormat' => $settings->get('dateInputFormat'), - 'timeInputFormat' => $settings->get('timeInputFormat'), - 'moneyFormat' => CRM_Utils_Money::format(1234.56), - ]); + if (!CRM_Core_Config::isUpgradeMode()) { + $items[] = Civi::service('asset_builder')->getUrl('crm-l10n.js', [ + 'cid' => $contactID, + 'includeEmailInName' => (bool) $settings->get('includeEmailInName'), + 'ajaxPopupsEnabled' => (bool) $settings->get('ajaxPopupsEnabled'), + 'allowAlertAutodismissal' => (bool) $settings->get('allow_alert_autodismissal'), + 'resourceCacheCode' => Civi::resources()->getCacheCode(), + 'locale' => CRM_Core_I18n::getLocale(), + 'lcMessages' => $settings->get('lcMessages'), + 'dateInputFormat' => $settings->get('dateInputFormat'), + 'timeInputFormat' => $settings->get('timeInputFormat'), + 'moneyFormat' => CRM_Utils_Money::format(1234.56), + ]); + } // These scripts are only needed by back-office users if (CRM_Core_Permission::check('access CiviCRM')) {