From: Coleman Watts Date: Thu, 8 Apr 2021 02:33:47 +0000 (-0400) Subject: Afform - Refresh assetBuilder when saving a form X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a19c781aa7ccd2c19e701044873575ea67fa0f7a;p=civicrm-core.git Afform - Refresh assetBuilder when saving a form On sites with caching enabled, changes were not showing until a manual flush --- diff --git a/Civi/Angular/Manager.php b/Civi/Angular/Manager.php index 7a075d585b..dacd8f3062 100644 --- a/Civi/Angular/Manager.php +++ b/Civi/Angular/Manager.php @@ -70,6 +70,8 @@ class Manager { $this->cache->clear(); $this->modules = NULL; $this->changeSets = NULL; + // Force-refresh assetBuilder files + \Civi::container()->get('asset_builder')->clear(FALSE); return $this; } diff --git a/ext/afform/core/Civi/Api4/Utils/AfformSaveTrait.php b/ext/afform/core/Civi/Api4/Utils/AfformSaveTrait.php index 18f9ced57f..bee09ea626 100644 --- a/ext/afform/core/Civi/Api4/Utils/AfformSaveTrait.php +++ b/ext/afform/core/Civi/Api4/Utils/AfformSaveTrait.php @@ -79,7 +79,6 @@ trait AfformSaveTrait { \CRM_Core_Menu::store(); \CRM_Core_BAO_Navigation::resetNavigation(); } - // FIXME if asset-caching is enabled, then flush the asset cache. $item['module_name'] = _afform_angular_module_name($item['name'], 'camel'); $item['directive_name'] = _afform_angular_module_name($item['name'], 'dash');