From dd4ce9f9faa63d4058510fa9b65371972c37cd89 Mon Sep 17 00:00:00 2001 From: Lucas Bartholemy Date: Fri, 5 Feb 2021 11:23:55 +0100 Subject: [PATCH] Update 2.1.9 --- docs/CHANGELOG.md | 5 +++++ module.json | 2 +- .../packageinstaller/controllers/InstallController.php | 10 ++++++++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 4034e37..d71201a 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -1,6 +1,11 @@ Changelog ========= +2.1.9 (February 5, 2021) +-------------------------- +- Fix: Better handle errors when assets directory cannot be cleared (+ retry) + + 2.1.8 (November 6, 2020) -------------------------- - Fix: Clear assets directory at the end of installation diff --git a/module.json b/module.json index 0847aa1..fd894b1 100644 --- a/module.json +++ b/module.json @@ -9,5 +9,5 @@ "humhub": { "minVersion": "1.0" }, - "version": "2.1.8" + "version": "2.1.9" } \ No newline at end of file diff --git a/modules/packageinstaller/controllers/InstallController.php b/modules/packageinstaller/controllers/InstallController.php index 89e259f..1e3dc09 100644 --- a/modules/packageinstaller/controllers/InstallController.php +++ b/modules/packageinstaller/controllers/InstallController.php @@ -87,6 +87,7 @@ public function actionMigrate() public function actionCleanup() { $this->updatePackage->delete(); + $this->flushCaches(); if (Yii::$app->request->post('theme') == 'true') { $this->switchToDefaultTheme(); @@ -115,8 +116,13 @@ protected function switchToDefaultTheme() protected function flushCaches() { Yii::$app->moduleManager->flushCache(); - Yii::$app->assetManager->clear(); Yii::$app->cache->flush(); - } + try { + Yii::$app->assetManager->clear(); + } catch (\Exception $ex) { + Yii::error('Could not clear assetManager: ' . $ex->getMessage(), 'updater'); + } + + } }