Upgrading from 5.4.1.1 - solved

Permalink
Hi all

I've posted about this before, but this time I managed to get it to work using the Dashboard upgrade and a bit of code editing.

The error in question is this:

[Sun Oct 16 19:10:28 2011] [error] [client 1.2.3.4] PHP Fatal error:  Call to undefined method User::getUserDefaultLanguage() in /home/mydomain/www/updates/concrete5.4.2.1/concrete/config/localization.php on line 7, referer: http://mydomain.com/index.php/dashboard/system/update/download_update/


I edited localization.php in /updates/concrete5.4.2.1/concrete/config/ to avoid that method, so the top few lines look like this:

//if ($u->getUserDefaultLanguage() != '') {
//      define('ACTIVE_LOCALE', $u->getUserDefaultLanguage());
//} else if (defined('LOCALE')) {
        define('ACTIVE_LOCALE', LOCALE);
//} else {
//      define('ACTIVE_LOCALE', SITE_LOCALE);
//}


(note that "define('ACTIVE_LOCALE', LOCALE);" is left uncommented).

That seemed to work, and now I'm running 5.4.2.1. Not sure if this will have any repercussions down the line, but since it relates only to locales I shouldn't have thought so.

melat0nin
 
melat0nin replied on at Permalink Reply
melat0nin
Turns out the LOCALE thing matters - references to jQuery's Datepicker widget require it to be set (and others probably too), otherwise (i) they won't work, and (ii) there'll be a 404 on their request, slowing the site down.

To fix this I added this line to /config/site.php:

define('LOCALE','en-GB');


(for the UK - it'll need to be tweaked for wherever you are). It works fine now.