Greetings,

I've found the following problem when developing multilingual site:

$locale = locale_initialize() is performed after module_init() in common.inc file.
module_init() function has somewhere a call of locale() function which tries to use global variable $locale. This variable is empty because has not been initialized yet.
Because of this cache_clear_all("locale:$locale") tries to clear cache entry with the cid = "locale:" which is incorrect.

Possible solution: call $locale = locale_initialize() BEFORE module_init() in common.inc file.

Comments

ardas’s picture

My proposition to swap these two calls is wrong because locale_initialize() will not initialize any language if locale.module is not loaded by module_ini().
So, we've got into situation when each of 2 functions need the other one to work correctly...

beginner’s picture

Version: 4.6.6 » x.y.z

same comment as for http://drupal.org/node/69031 :
We have to make sure this bug doesn't exist in cvs, too.
The fix can then be backported to 4.7 and 4.6 later.

ardas’s picture

This bug is rather critical. If it is fixed in CVS, ere you going to include it into 4.7.3 or further releases ?

Thank you.

beginner’s picture

There is a good 4.7 branch maintainer, so if a fix is found, it will probably be backported.
The problem is the issue queue is long, and we need more developper willing to contribute to fix all issues...

killes@www.drop.org’s picture

Status: Active » Fixed

This is already fixed in both branches.

Anonymous’s picture

Status: Fixed » Closed (fixed)