Forums | Mahara Community

Support /
v20.10 Upgrade failing


Duncan Ruddock's profile picture
Posts: 9

29 October 2020, 13:08

Hi,

Our institution is currently running version 15.10.5 of Mahara ( very old, I know :) )

I have set up a dev server and successfully migrated the dataroot and db. I have managed to incrementally update it all the way to version 20.04, but cannot upgrade to 20.10.

 

When I run the /admin/cli/upgrade.php, this is the output:

 

[root@dev-mahara-s03 cli]# php upgrade.php -f
PHP Warning:  Module 'json' already loaded in Unknown on line 0
[INF] 60 (admin/cli/upgrade.php:70) Upgrading Mahara
[INF] 60 (lib/mahara.php:242) Upgrading core
[DBG] 60 (lib/db/upgrade.php:1659) Update the View table to add coverimage column
[DBG] 60 (lib/db/upgrade.php:1662) Adding coverimage to view table
[DBG] 60 (lib/db/upgrade.php:1670) Update the Collection table to add coverimage column
[DBG] 60 (lib/db/upgrade.php:1673) Adding coverimage to collection table
[DBG] 60 (lib/db/upgrade.php:1684) Fixing skins for new format options
[DBG] 60 (lib/db/upgrade.php:1742) 1000/5669
[DBG] 60 (lib/db/upgrade.php:1742) 2000/5669
[DBG] 60 (lib/db/upgrade.php:1742) 3000/5669
You tried to access a page that does not exist.
Page with id XXXX not found.

 

On our prod server (Mahara v15), there is no page/group/user with that ID. I saw here that someone had similar output (Mahara community forum = 8713, I am a new user and thus cannot post links ) from their cli upgrade, and that it is due to an artefact that is missing from the dataroot folder and that the patch (review 11112) resolves the issue:

I have replaced the upgrade.php file (/lib/db/upgrade.php) with the patched version and restarted all services/rebooted, but am still getting the same error.

I have also removed all references of page XXXX from the psql DB and re-ran the upgrade. I get an identical error message, but with a different page ID.

Any light that anybody could shed on this would be hugely appreciated!

Thanks :)

 

Robert Lyon's profile picture
Posts: 749

30 October 2020, 9:58

Hi Duncan,

From what I can tell from your output the issue is not related to the skins issue but from the upgrade step after that where it tries to move the description information from the page (view table) to be a block on the page. But for some reason there is a problem where the page (view) doesn't exist.

I am suspecting it is to do with the upgrade step wanting to move all the current block on the page down by 1 so the new block can be added at the top.

To do this it finds and saves all the blocks on the page and I'm suspecting one of the blocks references a page that doesn't exist anymore.

Can I get you to try the following so that we can pinpoint where things are going wrong. Can you edit htdocs/lib/db/upgrade.php file and on line 1715 change

 foreach ($viewids as $viewid) {

to

 foreach ($viewids as $viewid) {  log_debug($viewid);

And on line 1726 change

 foreach ($blockids as $blockid) {

to

 foreach ($blockids as $blockid) { log_debug($blockid);

This way we can find out exactly which page and block is causing problems and then can check the database block_instance table to see what might be causing the issue.

Please let me know of your findings

Cheers

Robert

Duncan Ruddock's profile picture
Posts: 9

30 October 2020, 14:56

Hi Robert,

I removed db entries linking to the missing page (viewid) and the upgrade ran successfully :)

The viewid entry in question was created in 2011 and only contained a textbox, and was safe to remove in my situation 

Thank you for your help,

Duncan

Robert Lyon's profile picture
Posts: 749

14 November 2020, 16:04

Hi Duncan,

Good to hear you could sort your problem.

For anyone else that has this problem I did some more investigation and it turns out the issue was related to pages that belonged to a deleted group

I make a change to the code to fix this error

https://bugs.launchpad.net/mahara/+bug/1903478

Cheers

Robert

4 results