upgrade message
authordemeritcowboy <demeritcowboy@hotmail.com>
Fri, 5 May 2023 20:15:48 +0000 (16:15 -0400)
committerTim Otten <totten@civicrm.org>
Fri, 5 May 2023 20:34:08 +0000 (13:34 -0700)
CRM/Upgrade/Incremental/php/FiveSixtyOne.php

index c9e59195a3c04781e8da8531a44be4cfb4c5d641..75534f010b41d3d634b9005713631f714bbf78c7 100644 (file)
@@ -41,6 +41,14 @@ class CRM_Upgrade_Incremental_php_FiveSixtyOne extends CRM_Upgrade_Incremental_B
     }
   }
 
+  public function setPostUpgradeMessage(&$postUpgradeMessage, $rev): void {
+    if ($rev === '5.61.1') {
+      if (defined('CIVICRM_UF') && CIVICRM_UF === 'Drupal8') {
+        $postUpgradeMessage .= '<p>' . 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. <a %1>Read more</a>.', [1 => 'href="https://civicrm.org/redirect/drupal-5.61" target="_blank"']) . '</p>';
+      }
+    }
+  }
+
   /**
    * Upgrade step; adds tasks including 'runSql'.
    *
@@ -71,6 +79,12 @@ class CRM_Upgrade_Incremental_php_FiveSixtyOne extends CRM_Upgrade_Incremental_B
     $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`.
    *