From 5e4baeca161d51ff9dca56da83871008f3b94c56 Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Tue, 11 Jun 2019 16:42:53 -0400 Subject: [PATCH] Afform.update - If server_route changes, then clear menu/navigation system --- ext/afform/core/Civi/Api4/Action/Afform/Update.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/afform/core/Civi/Api4/Action/Afform/Update.php b/ext/afform/core/Civi/Api4/Action/Afform/Update.php index 879b26a681..212c252fb1 100644 --- a/ext/afform/core/Civi/Api4/Action/Afform/Update.php +++ b/ext/afform/core/Civi/Api4/Action/Afform/Update.php @@ -58,6 +58,10 @@ class Update extends BasicUpdateAction { // We may have changed list of files covered by the cache. $scanner->clear(); + if (isset($updates['server_route']) && $updates['server_route'] !== $orig[0]['server_route']) { + \CRM_Core_Menu::store(); + \CRM_Core_BAO_Navigation::resetNavigation(); + } // FIXME if `server_route` changes, then flush the menu cache. // FIXME if asset-caching is enabled, then flush the asset cache. -- 2.25.1