moodle administration not working after backup restore

moodle administration not working after backup restore

by dimitrisag . -
Number of replies: 9

Hello moodlers!

I tried to upgrade to 3.4.2 but my server don't support MySQL 5.5.31. So in order to have my site up and running I decided to restore from a backup created just before the upgrade. The site is up and running but when I try to go to site admin the link doesn't work at all. 

I tried to get through /admin/index.php but it gets me Exception - Class 'admin_setting_agedigitalconsentmap' not found


What is happening??? 

Average of ratings: Useful (1)
In reply to dimitrisag .

Re: moodle administration not working after backup restore

by Ken Task -
Picture of Particularly helpful Moodlers

agedigtalconsent ... for a users age?   Did you have a plugin for such a thing prior to the attempt at upgrading?

That sounds like something related to the additions to Moodle for GDPR - could be wrong ... but thought discussions on the topic said the next release ... point release ... to 3.4 and 3.3 would include GDPR related code.

Below posted 10 of March ...

https://tracker.moodle.org/browse/MDL-61622

So when you restored, did you restore the entire code directory of your previous working site *and* restore from the backup .sql of your DB as well?

Also, one might have to manually clear caches (files) in moodledata/cache moodledata/localcache.

Also ... remove browser cache and cookies.

'spirit of sharing', Ken


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

Re: moodle administration not working after backup restore

by dimitrisag . -

I cleared all my caches but still the same

I haven't install any plugin prior the upgrade...

I am a little bit confused...

In reply to dimitrisag .

Re: moodle administration not working after backup restore

by Ken Task -
Picture of Particularly helpful Moodlers

ummmm ... I'll repeat ...

"So when you restored, did you restore the entire code directory of your previous working site *and* restore from the backup .sql of your DB as well?"

Check apache error logs.

Turn on debugging.

'spirit of sharing', Ken

In reply to Ken Task

Re: moodle administration not working after backup restore

by dimitrisag . -

I fixed it just after upgrading to 3.4.2. I think that this was because i tried to uograde to a newer version and restore before the end of the upgrade. Possibly the script made some changes to the core of moodle (maybe it added a script that it was deleted somehow in the restoration proccess). I looked if there was any class or webservice with this name but nothing... Anyway the problem is now solved!!!

In reply to dimitrisag .

Re: moodle administration not working after backup restore

by Jeff Shelp -

I am having the same issue and cannot complete the upgrade because of database version and when I restore get the same error you were getting.  How did you finally complete the upgrade with the older database?  Please give detailed steps.  I am stuck on this page with the Server Checks during the upgrade:

database mysql (5.5.5-10.1.31-MariaDB) version 5.5.31 is required and you are running 5.5.5.10.1.31 Check (in red)

My host also will not upgrade the database.

This is confusing because we installed successfully and were running 3.4.1 with no issues.

In reply to Jeff Shelp

Re: moodle administration not working after backup restore

by dimitrisag . -
This is a classic Moodle's bug:

Go to config.php and change the name of database from 'mysqli' to 'mariadb'

Average of ratings: Useful (1)
In reply to dimitrisag .

Re: moodle administration not working after backup restore

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

It is not really a bug - it is that the user selected the wrong database during install.

Average of ratings: Useful (2)
In reply to dimitrisag .

Re: moodle administration not working after backup restore

by Jeff Shelp -

I saw that yesterday in the config file while trying to asses the problem, and dismissed it--I should have trusted my instincts!  Thanks for the reply.

We were using Softaculous with a cheap WestHost shared hosting, so I'm guessing the configuration script doesn't evaluate and correct this.  Easy fix now that I know.

In reply to dimitrisag .

Re: moodle administration not working after backup restore

by Jeff Shelp -
In regards to restore to pre-upgrade and getting rid of class not found error, when my host completely deleted the old database at a level higher than I have access to, and then ran the restore again, the error went away and I can now access the admin area of my moodle site normally.