Installation help

 
 
Picture of Connie Hu
Mixed Moodle versions detected
 

Hi -,

When i was upgrading moodle I got a message liek this:

'Mixed Moodle versions detected, upgrade can not continue.'

I am pretty sure that I only have a single version of Moodle there in the folder, I was just wondering what does Moodle use to decide whether it has got a only a single version or two versions?

I only have one config file there.

Thanks a lot!!!!!!!

Connie

 
Average of ratings: -
Picture of Ken Task
Re: Mixed Moodle versions detected
Group Particularly helpful Moodlers

Config file is one thing ... version.php files are another.

If linux, logged on as user that can view files in your Moodle code directory, issue

fgrep release version.php

That will show something like:

$release  = '2.3.6+ (Build: 20130411)'; // Human-friendly version name

In a 2.3.6+ version of Moodle there are several version.php files

Issue the following at same location:

find ./* -name version.php

That will list all subdirectories that contain a version.php file.

One example in moodlecode/user/profile/field/checkbox/:

fgrep version ./user/profile/field/checkbox/version.php

$plugin->version   = 2012061700;        // The current plugin version (Date: YYYYMMDDXX)
$plugin->requires  = 2012061700;        // Requires this Moodle version

So the error you are getting might mean just what it says ... mixed versions ... or files from old versions of moodle still remaining in the  2.3.6+ directory of folders/files.

'spirit of sharing', Ken

 

 
Average of ratings: -
Picture of Gordon Bateson
Re: Mixed Moodle versions detected
Group DevelopersGroup Particularly helpful MoodlersGroup Translators

Hi Ken,
the message is not caused by files called "version.php", so I'm afraid it won't help Connie to search for those files.

Connie,
although you are "pretty sure" you only have a single version of Moodle, I'm afraid your Moodle scripts folder contains files leftover from an earlier version of Moodle. It is those files that cause the message to be displayed. It doesn't matter what those files are. The important point is that you have tried to upgrade to a new major version of Moodle by simply overwriting the old Moodle scripts folder with a new version of Moodle. While that is OK for minor upgrades (e.g. 2.4.1 -> 2.4.2), it causes problems for major upgrades (e.g. 2.3 -> 2.4).

Please follow the instructions that appear later in the message that tell you how to create a new Moodle folder and copy across any thrid party plugins that you might be using.

good luck!
Gordon

 
Average of ratings: -
Picture of Connie Hu
Re: Mixed Moodle versions detected
 

Hi Thanks Gordon,

I fixed it by removing the 'Search' folder under the moodle directory.

not sure yet if this would cause any problems though.....

I am on testing server so I will try various things out....

Connie

 
Average of ratings: -
Picture of Howard Miller
Re: Mixed Moodle versions detected
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

Can I suggest that it isn't ok - period. There's no reason to copy the new version on top of the old. You only have to rename/copy/delete the old version.

The OP, in this case, "fixed it" by removing the search folder. However, evidence strongly suggests that the upgrade was done wrongly and there could be trouble in the future. The right thing to do is completely replace the Moodle code with a clean version.

 
Average of ratings: -
Sketch...
Re: Mixed Moodle versions detected
Group Particularly helpful Moodlers

Yes, it's so simple! Assuming Moodle is installed in \Moodle:

  1. Stop IIS/Apache
  2. Rename your existing Moodle folder to e.g.: \MoodleOld
  3. Create a new \Moodle folder
  4. Put the new version of Moodle in that new \Moodle folder
  5. Make sure the new \Moodle folder has the same permissions as the old one
  6. Start IIS/Apache
  7. Upgrade Moodle

 

 
Average of ratings: -
Picture of Connie Hu
Re: Mixed Moodle versions detected
 

Thanks Ken,

I removed the 'Search' folder under the moodle directory and fixed it.... not sure it would have any other problems yet... will try ....

Connie

 
Average of ratings: -
Picture of Alex Walker
Re: Mixed Moodle versions detected
Group Particularly helpful Moodlers

For anyone who sees this on upgrading, Moodle checks for the presence of old files before it upgrades. Here's a list of the files it checks for.

This list obviously may change in the future. You can find the list in lib/upgradelib.php. Search for 'someexamplesofremovedfiles'.

Note: this is the list of 'old files' from Moodle 2.4. If you're using an older version, don't delete these files, because you'll still be using them and things will break. Horribly.

  • /admin/tool/unittest/simpletestlib.php
  • /lib/minify/builder/
  • /lib/yui/3.4.1pr1/
  • /search/cron_php5.php
  • /course/report/log/indexlive.php
  • /admin/report/backups/index.php
  • /admin/generator.php
  • /lib/yui/2.8.0r4/
  • /blocks/admin/block_admin.php
  • /blocks/admin_tree/block_admin_tree.php

It's worth noting that this list doesn't mean "screw Moodle's upgrade protection, I'm just going to overwrite Moodle and remove these files" (I'm not aiming this at you, Connie, I'm just saying in general). That protection is in place for a reason, and you'll probably have lots of little issues if you don't upgrade properly. For example, course reports moved from /course/report to /report between 2.2 and 2.4, and if you leave the old files where they are, you'll get every course report showing twice in the navigation block and half of them won't work.

 
Average of ratings: -
Picture of Connie Hu
Re: Mixed Moodle versions detected
 

Thanks Alex! It is very useful!

Connie

 
Average of ratings: -