Last modified: 2011-03-13 18:05:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T23591, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 21591 - losing system messages when switching $wgLanguageCode = "en-gb" from $wgLanguageCode = "en";
losing system messages when switching $wgLanguageCode = "en-gb" from $wgLang...
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
Internationalization (Other open bugs)
1.16.x
All All
: Lowest major (vote)
: ---
Assigned To: Tim Starling
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-11-22 07:54 UTC by Jools Wills
Modified: 2011-03-13 18:05 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jools Wills 2009-11-22 07:54:33 UTC
My site was set to $wgLanguageCode = "en" and I have a few customised system messages (edited from the wiki). My user is actually set to en-gb and I can still see the customisations fine. On the system messages page, when choosing language "en" and searching for "modified" messages, my modifications show up.

However, when I switch $wgLanguageCode = "en-gb", the behaviour changes. I lose all my custom system messages. Doing a search from the System Messages special page for langauge "en" and searching for modified messages shows "no" messages. Doing a search for language "en-gb" and modified messages shows the same messages that I have changed, but it does not show my changes/customisations - it shows an exact copy of the "default" message.

This behaviour does not seem right at all.
Comment 1 Jools Wills 2009-12-01 22:54:52 UTC
In an attempt to clarify this issue, here are the steps to reproduce.

1. install SVN version of mediawiki. LocalSettings will contain $wgLanguageCode = "en";
2. edit MediaWiki:Common.css and add something like "body { background-color: #ddd}";
3. refresh and see the background changes.
4. change user preferences to en-GB and refresh. still can see common.css changes.
5. go to Special:AllMessages and search for Modified messages for language en. common.css shows up with our customisations.
6. edit LocalSettings.php and change $wgLanguageCode = "en" to $wgLanguageCode = "en-gb"
7. refresh and MediaWiki:Common.css changes are not showing.
8. search for modified messages for language en. No results.
9. search for modified messages for language en-GB. one result - common.css however, it shows the contents of the "modification" as identical to the default value. 

Original /* CSS placed here will be applied to all skins */
Modified : /* CSS placed here will be applied to all skins */

this bug is causing me big problems trying to change the default language. I'm upgrading it to major. downgrade if you disagree, but I hope someone can give me some feedback on this.
Comment 2 Tim Starling 2009-12-02 01:26:20 UTC
Can someone please check if it happens on 1.15?
Comment 3 Jools Wills 2009-12-02 01:32:57 UTC
I have just checked. behaviour is different on 1.15.1

7. refresh and MediaWiki:Common.css changes are not showing.
* on 1.15 they are showing

9. search for modified messages for language en-GB. one result - common.css
however, it shows the contents of the "modification" as identical to the
default value. 
* on 1.15 you can search for modified messages and the common.css shows up with the changes

Comment 4 Tim Starling 2010-01-06 05:44:10 UTC
Just clear the message cache, or wait for it to expire. The issue occurs because when $wgLanguageCode is en, the en-gb message cache stores only the en-gb customisations, and there aren't any so it's an empty array. When you change $wgLanguageCode to en-gb, the cache key is now meant to have all the default customisations, without any slash in the title, but it still has the empty array cached from before.

If you're using CACHE_DB, run the SQL query:

   sql> TRUNCATE TABLE objectcache;

If you're using CACHE_MEMCACHED:

   $ /etc/init.d/memcached restart

Alternatively, delete the problematic cache key:

   $ cd /path/to/wiki/maintenance
   $ php eval.php
   > $wgMemc->delete( "$wgDBname:messages:en-gb" );
Comment 5 Jools Wills 2010-01-06 14:25:10 UTC
Thanks. This has solved it for me.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links