mahara-contributors team mailing list archive
-
mahara-contributors team
-
Mailing list archive
-
Message #68413
[Bug 2006637] A change has been merged
Reviewed: https://reviews.mahara.org/c/mahara/+/13760
Committed: https://git.mahara.org/mahara/mahara/commit/103f1efd5c0aa713b42f0471960facf68378276f
Submitter: "Robert Lyon <robertl@xxxxxxxxxxxxxxx>"
Branch: 22.10_DEV
commit 103f1efd5c0aa713b42f0471960facf68378276f
Author: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
Date: Thu Feb 9 11:14:32 2023 +1300
Bug 2006637: Problem with populating blocktype_installed_viewtype table
For Blocktype::get_viewtypes() the list it returns is static
so if there are more than one call to it during an upgrade it doesn't
pick up any new viewtypes added after the first call.
In upgrade we need it to not be static
Change-Id: I023b0488929138a597a5a1ad058c2c344e23649f
Signed-off-by: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
(cherry picked from commit eb7abacbcbfa906e9662fd5cb7cfbc881c005973)
--
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/2006637
Title:
Issue with upgrade and setting the blocktype_installed_viewtypes
values correctly
Status in Mahara:
Fix Committed
Status in Mahara 21.10 series:
Fix Committed
Status in Mahara 22.04 series:
Fix Committed
Status in Mahara 22.10 series:
Fix Committed
Status in Mahara 23.04 series:
Fix Committed
Bug description:
When we add a new view type we update the blocktype_installed_viewtype
table to know what blocks can be used on this new view type.
But if we have an upgrade path where we add two new view types in one
upgrade session then the information is not correct from
Blocktype::get_viewtypes() because it is set to be static.
We need it to ignore this static-ness on upgrade.
To test:
Install a 20.04_STABLE site
Upgrade to main
Run the following command in database:
select * from blocktype_installed_viewtype where viewtype = 'activity' order by blocktype;
Should see:
29 (or 30) rows including 'placeholder' and 'image' blocktypes
Actually see:
21 (or 22) rows and 'placeholder' and 'image' blocktypes are missing
To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/2006637/+subscriptions
References