mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #66893
[Bug 1971910] A change has been merged
Reviewed: https://reviews.mahara.org/c/mahara/+/12721
Committed: https://git.mahara.org/mahara/mahara/commit/40acfd090364fd3cac998a2801addc6641de62ea
Submitter: "Robert Lyon <robertl@xxxxxxxxxxxxxxx>"
Branch: main
commit 40acfd090364fd3cac998a2801addc6641de62ea
Author: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
Date: Fri May 6 13:36:00 2022 +1200
Bug 1971910: Check if blocktype still exsists before getting the
viewtypes
So we don't throw error on upgrade when a plugin has been deleted
Change-Id: I2a31bdb6e9dbc73c4eac33169b22a298f151b09c
Signed-off-by: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
--
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: mahara-contributors
https://bugs.launchpad.net/bugs/1971910
Title:
install_blocktype_viewtypes_for_plugin() needs to check if block still
exists
Status in Mahara:
Fix Committed
Bug description:
If a blocktype is deleted then on upgrading to a newer version if we
call install_blocktype_extras() for another block - it will cause
errors / upgrade fail.
The install_blocktype_viewtypes_for_plugin() function should behave
like the install_blocktype_categories_for_plugin() for calling the
safe require()
To test:
1) Install a 21.10 site
2) Checkout main
3) Delete a blocktype plugin from codebase, eg rm -rf htdocs/blocktype/myfriends/
4) Run upgrade
Without patch - get errors:
[WAR] 47 (lib/mahara.php:1711) File htdocs/blocktype/myfriends/lib.php did not exist
Call stack (most recent first):
* safe_require() at htdocs/lib/upgrade.php:1235
* install_blocktype_viewtypes_for_plugin() at htdocs/lib/upgrade.php:1273
* install_blocktype_extras() at htdocs/lib/db/upgrade.php:450
* xmldb_core_upgrade() at htdocs/lib/upgrade.php:377
* upgrade_core() at htdocs/lib/mahara.php:281
* upgrade_mahara() at htdocs/admin/cli/upgrade.php:76
With patch should allow upgrade without errors
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1971910/+subscriptions
References