From bd14041230ab6e8489dafce18d0a3790c74fa93b Mon Sep 17 00:00:00 2001 From: dancgray Date: Sun, 27 Nov 2022 15:12:42 +0000 Subject: [PATCH 1/5] Don't throw error, fixes #2681 --- migrations/20220908105711-convertarialabels.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/migrations/20220908105711-convertarialabels.js b/migrations/20220908105711-convertarialabels.js index 00f19e2c59..4c3a864910 100644 --- a/migrations/20220908105711-convertarialabels.js +++ b/migrations/20220908105711-convertarialabels.js @@ -19,7 +19,8 @@ module.exports = { }; const props = origin().db.getModel('config')?.schema?.tree?._accessibility?._ariaLevels?.properties; if(!props) { - throw new Error(`Couldn't parse ARIA level defaults`); + console.error(`Couldn't parse ARIA level defaults`); + return; } const newDefaults = Object.entries(props).reduce((m, [k, v]) => Object.assign(m, { [k]: v.default }), {}); const configs = await (collection.find().toArray()); From 3f15c781c564020e5078dfe15cabc3057323b157 Mon Sep 17 00:00:00 2001 From: Tom Taylor Date: Mon, 28 Nov 2022 12:40:57 +0000 Subject: [PATCH 2/5] Catch and log error in migration --- migrations/20190411153144-replacepurgedroles.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/migrations/20190411153144-replacepurgedroles.js b/migrations/20190411153144-replacepurgedroles.js index 8860856668..1938066fc7 100644 --- a/migrations/20190411153144-replacepurgedroles.js +++ b/migrations/20190411153144-replacepurgedroles.js @@ -18,10 +18,14 @@ module.exports = { if(!newRole) { throw new Error(`Db must define the ${newRole} to replace ${oldRole}`); } - await users.updateMany({ roles: { $in: [oldRole._id] } }, { $set: { roles: [newRole._id] } }); - await roles.deleteOne({ name: oldName }); + try { + await users.updateMany({ roles: { $in: [oldRole._id] } }, { $set: { roles: [newRole._id] } }); + await roles.deleteOne({ name: oldName }); + } catch(e) { + console.error(e); + } })); }, async down(db, client) {} -}; \ No newline at end of file +}; From 6c59f1d5dbc16ae9ef1cf6497be1507aa77fbb77 Mon Sep 17 00:00:00 2001 From: Tom Taylor Date: Mon, 28 Nov 2022 15:40:00 +0000 Subject: [PATCH 3/5] Update CHANGELOG.md --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a9c0567286..763112be7e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,14 @@ All notable changes to the Adapt authoring tool are documented in this file. **IMPORTANT**: For information on how to **correctly and safely** update your installation, please consult **INSTALL.md**.
_Note that we adhere to the [semantic versioning](http://semver.org/) scheme for release numbering._ +## [0.11.1] - 2022-11-28 + +Bugfix release. + +### Fixed +- New installs return an error when running migrations ([#2681](https://github.com/adaptlearning/adapt_authoring/issues/2681)) +- Error thrown on role migration ([#2688](https://github.com/adaptlearning/adapt_authoring/issues/2688)) + ## [0.11.0] - 2022-10-17 The final minor release of the 'legacy' codebase. This release bundles critical security updates with some other minor improvements. @@ -750,6 +758,7 @@ Initial release. - Loading screen of death - Session cookie security issues +[0.11.1]: https://github.com/adaptlearning/adapt_authoring/compare/v0.11.0...v0.11.1 [0.11.0]: https://github.com/adaptlearning/adapt_authoring/compare/v0.10.5...v0.11.0 [0.10.5]: https://github.com/adaptlearning/adapt_authoring/compare/v0.10.4...v0.10.5 [0.10.4]: https://github.com/adaptlearning/adapt_authoring/compare/v0.10.3...v0.10.4 From 8b306c7e67bd16ecad8cc8e651d5a30f6c93295d Mon Sep 17 00:00:00 2001 From: Tom Taylor Date: Mon, 28 Nov 2022 15:41:41 +0000 Subject: [PATCH 4/5] Bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cbc748e848..542c48afc7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "adapt_authoring", - "version": "0.11.0", + "version": "0.11.1", "license": "GPL-3.0", "description": "A server-based user interface for authoring eLearning courses using the Adapt Framework.", "keywords": [ From 95df184a4af04bc8fdd6ea3422dcc1c9648e3c10 Mon Sep 17 00:00:00 2001 From: Tom Taylor Date: Fri, 2 Dec 2022 15:13:10 +0000 Subject: [PATCH 5/5] Update CHANGELOG.md release date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 763112be7e..f30dc4af5a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ All notable changes to the Adapt authoring tool are documented in this file. **IMPORTANT**: For information on how to **correctly and safely** update your installation, please consult **INSTALL.md**.
_Note that we adhere to the [semantic versioning](http://semver.org/) scheme for release numbering._ -## [0.11.1] - 2022-11-28 +## [0.11.1] - 2022-12-02 Bugfix release.