mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #66892
[Bug 1971910] Re: install_blocktype_viewtypes_for_plugin() needs to check if block still exists
** Changed in: mahara
Milestone: None => 22.10.0
** Changed in: mahara
Importance: Undecided => Medium
** Changed in: mahara
Status: New => Fix Committed
--
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