Reviewed: https://reviews.mahara.org/c/mahara/+/13740 Committed: https://git.mahara.org/mahara/mahara/commit/eb7abacbcbfa906e9662fd5cb7cfbc881c005973 Submitter: "Robert Lyon <robe...@catalyst.net.nz>" Branch: main
commit eb7abacbcbfa906e9662fd5cb7cfbc881c005973 Author: Robert Lyon <robe...@catalyst.net.nz> 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 <robe...@catalyst.net.nz> -- 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: Confirmed Status in Mahara 22.04 series: Confirmed Status in Mahara 22.10 series: Confirmed 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 _______________________________________________ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp