Upgrade to Moodle 4.2 help

Upgrade to Moodle 4.2 help

by Douglas Matheson -
Number of replies: 11
Hi everyone, can I please have some help?

I upgraded from Moodle 4.0.8 to 4.2 this morning and it failed.  I am hosted at namecheap and used softcalculous to erform the upgrade.  The error I get is as follows:


However, I cannot find anything that explains the fail and I cannot seem to cancel the upgrade and rollback the installation.  I have very liited programming experience with php (I have some with other languages, so I'm not afrad of trying things) but for all intents and purposes it seems I'm locked out.

If anyone can help, I would greatly appreciate it.
Average of ratings: -
In reply to Douglas Matheson

Re: Upgrade to Moodle 4.2 help

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
This is going to sound a bit unhelpful, but I'm afraid it's the best advice.

We don't provide or support Softaculous or have any idea what it does internally. You need to request support from namecheap and/or Softaculous. To be fair, from what we've seen, Softaculous support is pretty good.
Average of ratings: Useful (1)
In reply to Howard Miller

Re: Upgrade to Moodle 4.2 help

by Douglas Matheson -
Thank you for coming back to me so quickly!

So it's an issue from softaculous? I just assumed that because it happened from the moodle/admin address it was an issue with Moodle.

Is there any way that I can get a sample of Moodle 4.2's SQL tables? I might be able to copy the data.
In reply to Douglas Matheson

Re: Upgrade to Moodle 4.2 help

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
It's not created a table during the upgrade by the looks of things. If it's not created that table then there's absolutely no reason to believe that is the only problem. The actual answer is to restore your original Moodle site from the backup that I hope you took, enable Debugging and try again.

However, Softaculous being in the mix makes this tricky. As I say, I have no idea what it does when it upgrades Moodle. Also, we have had *many* reports of problems with upgrading when Softaculous was used. So much so that we strongly recommend not using it at all.
Average of ratings: Useful (1)
In reply to Howard Miller

Re: Upgrade to Moodle 4.2 help

by Douglas Matheson -
Hi Howard,

Thanks again for coming back to me:

'So much so that we strongly recommend not using it at all.' wow! I didn't realise it was so buggy! I'll take it on board for the future.

They got back to me with a quick comment that they're looking into it, so I'll give them a couple of hours and then start the restoration.

Thanks again!
In reply to Douglas Matheson

Re: Upgrade to Moodle 4.2 help

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I'm not specifically suggesting that it's buggy. I'm saying that if you have problems due to a Softaculous issue then there's usually nothing we can do to help, here.
In reply to Douglas Matheson

Re: Upgrade to Moodle 4.2 help

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

The table h5p should be present in a Moodle 4.0 site. The Moodle 4.2 upgrade script expects to find it and fails because it's not there.

Can you see if you have any of the h5p tables? On my Moodle 4.0 test site I have:

SHOW TABLES LIKE '%h5p%';
+----------------------------------+
| Tables_in_m40_ideapad (%h5p%)    |
+----------------------------------+
| mdl_h5p                          |
| mdl_h5p_contents_libraries       |
| mdl_h5p_libraries                |
| mdl_h5p_libraries_cachedassets   |
| mdl_h5p_library_dependencies     |
| mdl_h5pactivity                  |
| mdl_h5pactivity_attempts         |
| mdl_h5pactivity_attempts_results |
+----------------------------------+

I've attached the CREATE TABLE statements for the above. If your $CFG->prefix is not 'mdl_' then you'll need to change these table names. If you're not using the recommended database character set and collation (utf8mb4 and utf8mb4_unicode_ci respectively) then you'll need to change these to your settings.

As Howard says third party installers like Softaculous may not install or upgrade Moodle correctly.

Average of ratings: Useful (1)
In reply to Leon Stringer

Re: Upgrade to Moodle 4.2 help

by Douglas Matheson -
@Leon I never do this, but can you tell me a charity that you support so that I can make a donation please? You have solved my problem. I imported the file into myphpadmin, rant he upgrade again and BOOM no more issues (I think). I can use it the way it should be used smile
In reply to Douglas Matheson

Re: Upgrade to Moodle 4.2 help

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
I would tread very carefully in case there are other problems.
In reply to Howard Miller

Re: Upgrade to Moodle 4.2 help

by Douglas Matheson -
Agreed. We are going to be doing as much testing as we can before releasing it back to the students and I've requested an investigation from softaculous. Hopefully it can shed some light on the matter.
In reply to Douglas Matheson

Re: Upgrade to Moodle 4.2 help

by Ken Task -
Picture of Particularly helpful Moodlers
Can't resist ... am going to inject something into this thread ...

Trying to keep this specific to just moodle itself, but does expand into DB.

The reason things like Softac exist is due to gaps.  Users want something 'easy' - install and/or updates/upgrades.  But the further one strays from 'native' the more potential there is for issues.

In the case of Moodle, upgrading is documented ...
there are two ways ... in the link above you will see a section on git.

If, where you host, your cPanel shows a Git icon and more importantly a Terminal icon, you have the ability to use git from command line to update/upgrade your moodle core more reliably ... if you can get by 'clas' (command line avoidance syndrome).   Don't have to be a CLN (command line ninja) to do it either!

As we know, the number 1 or 2 reason for breaches is 'failure to fix or patch' ... that goes for the operating system as well as applications.
General Release Calendar for Moodle
Does softac offer point releases?

Unlike, WordPress, Joomla, other which has built in updating/upgrading ability, Moodle does not ... thus Softac gap filler.   I'll say this though, if they don't provide reliable point releases they are falling short of filling that gap.

Another reason for Terminal access ... better specific backups with native to OS tools - like tar and mysql/mariadb command line tools mysqldump.

'SoS', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Upgrade to Moodle 4.2 help

by Douglas Matheson -
Hi Ken,

Thanks for your answer, I'm looking forward to checking it out! I've used git for python projects, but these were always empty of data so I was never worried - but as Moodle is full of student data my blood pressure was pretty high!

Moodle seems to be something of a rabbit warren for me, just when I think I'm confident in my knowledge I find that I'm only scratching the surface!