From 035499f5e15a011cd3222b412d2d741e9c358bc7 Mon Sep 17 00:00:00 2001 From: demeritcowboy Date: Fri, 5 May 2023 16:15:48 -0400 Subject: [PATCH] upgrade message --- CRM/Upgrade/Incremental/php/FiveSixtyOne.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CRM/Upgrade/Incremental/php/FiveSixtyOne.php b/CRM/Upgrade/Incremental/php/FiveSixtyOne.php index c9e59195a3c0..75534f010b41 100644 --- a/CRM/Upgrade/Incremental/php/FiveSixtyOne.php +++ b/CRM/Upgrade/Incremental/php/FiveSixtyOne.php @@ -41,6 +41,14 @@ public function setPreUpgradeMessage(&$preUpgradeMessage, $rev, $currentVer = NU } } + public function setPostUpgradeMessage(&$postUpgradeMessage, $rev): void { + if ($rev === '5.61.1') { + if (defined('CIVICRM_UF') && CIVICRM_UF === 'Drupal8') { + $postUpgradeMessage .= '

' . ts('You must do a one-time clear of Drupal caches now before visiting CiviCRM pages to rebuild the menu routes to avoid fatal errors. Read more.', [1 => 'href="https://civicrm.org/redirect/drupal-5.61" target="_blank"']) . '

'; + } + } + } + /** * Upgrade step; adds tasks including 'runSql'. * @@ -71,6 +79,12 @@ public function upgrade_5_61_alpha1($rev): void { $this->addTask(ts('Create index %1', [1 => 'civicrm_campaign.UI_name']), 'addIndex', 'civicrm_campaign', 'name', 'UI'); } + /** + * Needs to exist for postUpgradeMessage to get called. + */ + public function upgrade_5_61_1($rev): void { + } + /** * Remove extraneous/duplicate records from `civicrm_cache`. *