Best practice forum (Archived)

Issue upgrading from 2.4.14 to 2.5.3 (and 2.5.4)

 
Scott Drummond
Issue upgrading from 2.4.14 to 2.5.3 (and 2.5.4)
by Scott Drummond - Friday, 27 December 2013, 11:38 AM
 

Hello,

We were trying to upgrade from 2.4.14 to 2.5.3 and were recieving a message at the plugins attention screen about the Totara Core needing to be downgraded. 

Attached is the screenshot. 

When we click on Upgrade Moodle Database now, it tries to go through the process and we get the following screen

If we click on Continue at that screen, it sends us back to the first message.  We do alter totara.php, we were wondering if that could have anything to do with this, however we have tried replacing the totara.php file with the stock totara.php file and there was no change.  Users are able to logon to the portal however, we can't get in as administrators to modify anything. 

 

Thanks for your help. 

 

Ciaran Irvine (Core Developer)
Re: Issue upgrading from 2.4.14 to 2.5.3 (and 2.5.4)
by Ciaran Irvine (Core Developer) - Sunday, 29 December 2013, 12:32 PM
 

Hi Scott,

At some point either the upgrade got half-way through and then failed, or you may have implemented a custom change to totara_core and changed the number on the totara/core/version.php.

From 2.4.14 the proper totara_core version number should be 2013070805 so you should run the following query on the database

 

UPDATE mdl_config_plugins SET value='2013070805' WHERE plugin='totara_core' and name='version'

 

This will reset the version of totara_core to the 2.4.14 version number and should allow the upgrade to proceed normally.

A Eisenberg
Re: Issue upgrading from 2.4.14 to 2.5.3 (and 2.5.4)
by Alan Eisenberg - Monday, 30 December 2013, 7:14 AM
 

Hi Ciaran:

Just thought I'd comment as well as I am working with Scott on this. We checked the version in the database and all was OK. The big change that seems to be affecting our update is when I try to add the new theme I developed that is based on the new version of "Customtotara". I copied the "customtotara" theme and the only change I make is I add the layouts into them that are from "Standardtotara", because "Customtotara" does not include layouts, which we need to update to make the site more 508 Compliant.

I did this on our Development site with 2.5.3 without a problem. When we first updated from 2.4.14 to 2.5.3, we did not get an error on the totara_core until we tried to implement the new Theme. I had asked for good directions in updating the themes, since the old 2.4 themes no longer worked correctly in the new 2.5. It seems that themes are another area that need to be updated.

So I tried cleaning up the theme and we will try again. I'm not sure where to go next without more specific directions from Totara on how to make a proper Cloned version of "Customtotara" that would allow for the layouts to be updated (ie add the logo and favicon and the new CSS we created). I did this in 2.4 and it didn't cause any issues. I am trying the same in 2.5, but we seem to be getting this Totara Core issue. Further thoughts?

We will report if we get it working today.

b/r,

Alan

Ciaran Irvine (Core Developer)
Re: Issue upgrading from 2.4.14 to 2.5.3 (and 2.5.4)
by Ciaran Irvine (Core Developer) - Monday, 30 December 2013, 1:26 PM
 

Hi Alan,

The upgrade screen error is showing that the registered version of totara_core in mdl_config_plugins is 2013120300. The way the upgrade works is by comparing the registered number of the plugin in mdl_config_plugins with the number in the plugins version.php, in this case totara/core/version.php. The 2.4.14 version should be 2013070805.

So normally the only way this could have happened is if the 2.5.3 version of the /totara/core folder was present at some point and the upgrade process was run while the rest of the code was still on 2.4.14. Each plugin is essentially standalone and there's no way I can think of that adding or changing a theme would cause a version bump in a completely unrelated component like this.

Maybe the customtotara theme calls functions in totara_core and so someone accidentally dropped in the 2.5 version of that code? Resetting the value in mdl_config_plugins should allow the upgrade to proceed.

Ciaran Irvine (Core Developer)
Re: Issue upgrading from 2.4.14 to 2.5.3 (and 2.5.4)
by Ciaran Irvine (Core Developer) - Monday, 30 December 2013, 1:45 PM
 

Apologies Alan, on further investigation there is indeed an issue with the totara_core plugin. A patch in 2.5.3 updates the version number in the database, but leaves the version.php number as 2013102900.

This would then cause an issue when trying to install or update any third-party plugins (like your theme).

There's an easy fix, just change the line in totara/core/version.php to

$plugin->version = 2013120300;

I'll make sure this is fixed for the next 2.5 release. Apologies again for the crossed wires!

A Eisenberg
Re: Issue upgrading from 2.4.14 to 2.5.3 (and 2.5.4)
by Alan Eisenberg - Tuesday, 31 December 2013, 7:03 AM
 

Thank you Ciaran, as usual, for your research into the problem. I am glad it wasn't on our end, because we were very confused.

I still think it very important that Totara at some point make detailed instructions on the proper method to clone their layouts and use them as design elements for customers. This is a customer must request and while Moodle has instructions, I have found that they don't exactly match the correct way to do this in Totara.

Please consider making this for the customtotara, totararesponsive, and kiwi designs to help those of us that work with the clients to offer the most flexibility with the tool.

Again, thank you for helping resolve this issue.

b/r,

Alan Eisenberg

Ciaran Irvine (Core Developer)
Re: Issue upgrading from 2.4.14 to 2.5.3 (and 2.5.4)
by Ciaran Irvine (Core Developer) - Monday, 6 January 2014, 9:17 PM
 

A fix for this issue was included in today's (7th January 2014) release of Totara 2.5.5