Skip to content

Commit

Permalink
Update 2.1.9
Browse files Browse the repository at this point in the history
  • Loading branch information
luke- committed Feb 5, 2021
1 parent 2ef8d88 commit dd4ce9f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
"humhub": {
"minVersion": "1.0"
},
"version": "2.1.8"
"version": "2.1.9"
}
10 changes: 8 additions & 2 deletions modules/packageinstaller/controllers/InstallController.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ public function actionMigrate()
public function actionCleanup()
{
$this->updatePackage->delete();
$this->flushCaches();

if (Yii::$app->request->post('theme') == 'true') {
$this->switchToDefaultTheme();
Expand Down Expand Up @@ -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');
}

}
}

0 comments on commit dd4ce9f

Please sign in to comment.