Skip to content

Commit

Permalink
Merge pull request #26159 from demeritcowboy/drupal-cache
Browse files Browse the repository at this point in the history
Upgrade message for drupal9 sites to advise to clear drupal cache
  • Loading branch information
demeritcowboy authored May 5, 2023
2 parents 2397376 + 035499f commit aa9c250
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions CRM/Upgrade/Incremental/php/FiveSixtyOne.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 .= '<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'.
*
Expand Down Expand Up @@ -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`.
*
Expand Down

0 comments on commit aa9c250

Please sign in to comment.