Old Code Error message

Old Code Error message

by Tony Pattinson -
Number of replies: 6

After having a problem with my database which was solved in this post I now get the ERROR!!! The code you are using is OLDER than the version that made these databases! message when I click on Notifications.

Moodle docs say that the answer to this problem is to upgrade the code to the latest version but I have checked the version and build on both my local site, which was used to generate the database, and the server version; they are indentical (2.2.3+ build 20121116).

Checking the server environment gives this error message:

Unicode: It is required that you store all your data in Unicode format (UTF-8). New installations must be performed into databases that have their default character set as Unicode. If you are upgrading, you should perform the UTF-8 migration process (see the Admin page).

Using PHPMyadmin I checked the collation on both databases and it is utf8_unicode_ci.

Any sugggestions as to what is going on and how to rectify this would be appreciated.

Average of ratings: -
In reply to Tony Pattinson

Re: Old Code Error message

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

First problem, find the mdl_config table in your database and look for the record where name='version'. What is the value?

Second problem. Nothing to do with collation - it's the character set that is the issue. Normally, you can just tell phpMyAdmin to set the character set for the database to UTF8 and the problem goes away.

In reply to Howard Miller

Re: Old Code Error message

by Tony Pattinson -

Hi Howard

The mdl_config table name='version' value is 2012062503.01

According to phpMyadmin the charset is already MySQL charset: UTF-8 Unicode (utf8)

In reply to Tony Pattinson

Re: Old Code Error message

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

UTF8 - set it to something else then back again. That should 'force' it.

So the version in the database is different again, not identical. Something odd going on here. I'm at a bit of a loss what has happened.

In reply to Howard Miller

Re: Old Code Error message

by Tony Pattinson -

Good Morning Howard/Ken

Perhaps the best solution to all my current problems would be to delete everything from the server and start again with a completely clean set up. I don't have a lot of course related material so regurgitating it would not be a big problem. I could work on the server and then use the backup/restore process to download the database to the localhost.

Commnets/ thoughts?

In reply to Tony Pattinson

Re: Old Code Error message

by Ken Task -
Picture of Particularly helpful Moodlers

Can't speak for Howard, but ... that sounds like a good plan, but have you tried taking a backup from local and restoring it to the server?

If you go forward with this plan ... backup courses and restore them rather than site migrations from server to local.

As long as server version is same as local and both have same add-ons, that is.

My 2 cents! ;)

Ken

 

In reply to Tony Pattinson

Re: Old Code Error message

by Tony Pattinson -

Just to close out this thread I decided to start completely from new on another url that I use for development purposes. That solved the "old code" but led to another series of issues see other posts for details.