Last modified: 2014-01-07 09:48:10 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 T57473, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 55473 - [REGRESSION] i18n fallback uses message from i18n file before message from db.
[REGRESSION] i18n fallback uses message from i18n file before message from db.
Status: PATCH_TO_REVIEW
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.22.0
All All
: High normal with 1 vote (vote)
: ---
Assigned To: Tisza Gergő
https://commons.wikimedia.org/wiki/Co...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-08 17:59 UTC by Rainer Rillke @commons.wikimedia
Modified: 2014-01-07 09:48 UTC (History)
9 users (show)

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


Attachments

Description Rainer Rillke @commons.wikimedia 2013-10-08 17:59:07 UTC
Since some months, the license text selector language fallback is broken at Commons: 
https://commons.wikimedia.org/wiki/Commons:Village_pump#Can_somebody_help.3F_.22No_license_specified.22
https://commons.wikimedia.org/w/index.php?title=Commons:Village_pump&oldid=106628661#Can_somebody_help.3F_.22No_license_specified.22

It apparently worked before (but I am not sure):
https://commons.wikimedia.org/w/index.php?title=Special%3ALog&type=&user=&page=MediaWiki%3ALicenses%2Fnn&year=&month=-1&tagfilter=&hide_patrol_log=1
(message deleted because it was redundant to the English version)

How to reproduce:
Go to https://commons.wikimedia.org/wiki/Special:Upload?uselang=de-at
and the Lizenz:-<select> only contains one entry. This is because [[MediaWiki:Licenses/de-at]] does not exist. I would, however, expect that in this case [[MediaWiki:Licenses/de]] is used.
Comment 1 kjerstil.ubit 2013-10-09 17:23:55 UTC
Thank you so much for fixing this bug! 
*This was the problem in the Norwegian uploading form: 
*There were licensing options at Commons:Upload before they disappeared a few months ago (using option "It is from somewhere else") which links directly to Special:Upload
*I did not change my language preferences.
Now everthing is in order again!
I have never commented here in Bugzilla before, so I do not know how to sign here. Maybe I do, just by being logged on? Commons-user: Kjersti Lie
Comment 2 Rainer Rillke @commons.wikimedia 2013-10-09 17:57:26 UTC
(In reply to comment #1)
> Now everthing is in order again!
This is because https://commons.wikimedia.org/wiki/MediaWiki:Licenses/nb is now in place. The bug that the fallback language logic is broken still persists.

> I have never commented here in Bugzilla before, 
> so I do not know how to sign here.
No need to do so. Unfortunately there is no means connecting your Wikimedia Commons/Wikipedia account with Bugzilla

> Thank you so much for fixing this bug!
Thank you for commenting here and welcome at Bugzilla!
Andre Klapper is our Bug wrangler (the person who makes sure Bugzilla runs).
Comment 3 Andre Klapper 2013-10-10 00:00:16 UTC
(In reply to comment #2)
> No need to do so. Unfortunately there is no means connecting your Wikimedia
> Commons/Wikipedia account with Bugzilla

For the records, that's bug 14487 and we'll take a look in the next months.
Comment 4 Fabrice Florin 2013-10-10 17:40:24 UTC
Thanks for reporting this, Rainer!

We will investigate the cause of the problem, then determine what will be required to fix it, then prioritize it based on that new information.

Please let us know if you come across anything useful on your end that could help us find the source of this issue.
Comment 5 Bawolff (Brian Wolff) 2013-10-21 17:30:12 UTC
(In reply to comment #0)
> Since some months, the license text selector language fallback is broken at
> Commons: 
> https://commons.wikimedia.org/wiki/Commons:Village_pump#Can_somebody_help.
> 3F_.22No_license_specified.22
> https://commons.wikimedia.org/w/index.php?title=Commons:
> Village_pump&oldid=106628661#Can_somebody_help.3F_.22No_license_specified.22
> 
> It apparently worked before (but I am not sure):
> https://commons.wikimedia.org/w/index.
> php?title=Special%3ALog&type=&user=&page=MediaWiki%3ALicenses%2Fnn&year=&mont
> h=-1&tagfilter=&hide_patrol_log=1
> (message deleted because it was redundant to the English version)
> 
> How to reproduce:
> Go to https://commons.wikimedia.org/wiki/Special:Upload?uselang=de-at
> and the Lizenz:-<select> only contains one entry. This is because
> [[MediaWiki:Licenses/de-at]] does not exist. I would, however, expect that in
> this case [[MediaWiki:Licenses/de]] is used.

I imagine introduced in 86b54375de7e / attempts to fix bug 1495, as that was last major change to this code area.
Comment 6 Tisza Gergő 2013-10-22 16:27:35 UTC
Also affects languages which have no other fallback than English: https://commons.wikimedia.org/wiki/Special:Upload?uselang=eo
and other wikis: https://en.wikipedia.org/wiki/Special:Upload?uselang=de

Other $wgForceUIMsgAsContentMsg messages do not do this:
https://commons.wikimedia.org/wiki/Special:ExpandTemplates?input={{int:contact-url}}&uselang=de-at
Comment 7 Tisza Gergő 2014-01-06 21:35:31 UTC
MediaWiki:Licenses is a special message that only exists in the English messages file, with a '-' value. Before 86b54375de7e, MessageCache::get() had special handling for messages whose value was exactly '-', so the lookup went like this:

* check DB for current lang (miss)
* check CDB ('-')
* special handling for '-': check DB for default lang (returns the english license list)

Since 86b54375de7e, lookup goes like this:

* check DB for current lang (miss)
* check CDB ('-')
* use '-' as the license list (lines not starting with '*' are ignored, so this is the same as an empty list)

The root problem is that DB lookups return the current language or null, while CDB lookups include fallbacks, so a CDB fallback will take precedence over a DB fallback which is at the same or higher position in the fallback chain. This causes a lot of other problems apart from this bug, and a patch is already pending: https://gerrit.wikimedia.org/r/#/c/72867/ 

Once that gets merged, the lookup will look like this:
* check DB for current lang (miss)
* check CDB for current lang (miss)
* walk back fallback chain, check first DB then CDB for each (eventually gets English license list or a localization)

which fixes this bug and is actually an improvement over the old (which returned English and not German license list for 'de-at').

It seems that that patch is stuck in review limbo, though.
Comment 8 Nemo 2014-01-06 22:03:51 UTC
For clarity, the current plan is Niklas' option 1 as per bug 46579 comment 17.
Comment 9 Gerrit Notification Bot 2014-01-07 00:25:01 UTC
Change 72867 had a related patch set uploaded by Parent5446:
Complete usage of message fallback chain

https://gerrit.wikimedia.org/r/72867
Comment 10 Tisza Gergő 2014-01-07 01:16:14 UTC
(In reply to comment #8)
> For clarity, the current plan is Niklas' option 1 as per bug 46579 comment
> 17.

Is it? 86b54375de7e, which was merged half a year ago, takes a completely different direction.

Anyway, if that option would be implemented, that would fix this bug as well, although then MediaWiki:Licenses should be moved to MediaWiki:Licenses/en.
Comment 11 Nemo 2014-01-07 06:31:47 UTC
(In reply to comment #10)
> (In reply to comment #8)
> > For clarity, the current plan is Niklas' option 1 as per bug 46579 comment
> > 17.
> 
> Is it? 86b54375de7e, which was merged half a year ago, takes a completely
> different direction.

That's only temporary, doing everything at once was too much.

> 
> Anyway, if that option would be implemented, [...]
> then MediaWiki:Licenses should be moved to MediaWiki:Licenses/en.

Yep, it should.
Comment 12 Rainer Rillke @commons.wikimedia 2014-01-07 09:48:10 UTC
(In reply to comment #11)
> That's only temporary, doing everything at once was too much.
And breaking existing things? No, then you can surely make use of branches.

Anyway, independently from what is being implemented, I would be glad having a link to a documentation page for that behaviour here so I can check existing messages at Commons. Thank you.

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


Navigation
Links