[Bug] Querying Wikipedia for langlinks doesn't work for be-tarask, but works for be-x-old
Open, HighPublic

Description

be-x-old.wikipedia.org was renamed to be-tarask.wikipedia.org (T11823).

Now, querying the API with langlinks for be-tarask doesn't work, but querying for be-x-old does work.

See:

I'd expect both to work: be-tarask as the current and be-x-old for backwards compatibility.

I'm not sure whether it's a bug in core, in Wikimedia configuration, in Wikidata, or elsewhere. This might be related to T111822, but I'm creating this bug in case it isn't.

Related Objects

Amire80 created this task.Sep 13 2015, 6:39 AM
Amire80 updated the task description. (Show Details)
Amire80 raised the priority of this task from to Unbreak Now!.
Amire80 added subscribers: Amire80, Nikerabbit, aude and 2 others.
Restricted Application added subscribers: Dereckson, Matanya, Aklapper. · View Herald TranscriptSep 13 2015, 6:39 AM
Amire80 set Security to None.Sep 13 2015, 6:44 AM
Amire80 added a subscriber: Krenair.
aude added a comment.Sep 13 2015, 10:40 AM

This is because be-x-old is still in the wb_items_per_site table and other places in the database (e.g. the entity json blobs).

We need to figure out a migration strategy for this and such renames in general.

This might include adding a new entry in the sites table with be_tarask as the site id and keeping the old id, but marking it somehow as inactive.

When new site links are added, don't allow new site links to be_x_old(?) and don't allow there to be site links to both be_x_old and be_tarask?

Have a maintenance script update existing site links to the new site id.

In old revisions, we still have the old site id and everything (e.g. viewing diffs, etc.) still needs to work with it.

aude added a comment.Sep 13 2015, 10:47 AM

possibly the rename of existing site links could be a bot task

aude added a comment.Sep 13 2015, 10:49 AM

probably not something we can fix tomorrow, but have suggested this as something high priority for our next sprint (starting tuesday)

It seems it's not possible to add sitelink to be_tarask yet, If it's possible I will do the bot job :)

Best

As far as the API goes, it just uses whatever is in the langlinks table (which, as seems to be implicitly noted already, comes from wikidata.org now). I doubt we'll end up having both working as queries, as that would require duplicate entries in said table.

daniel added a subscriber: daniel.Sep 17 2015, 4:36 PM

For reference: when generating langlinks based on information from Wikidata, Wikibase relies on information from the sites_identifiers table. The respective code could be added or replaced there. Not sure what would happen if multiple interlanguage prefixes would be defined there for the same wiki, though.

JanZerebecki renamed this task from Querying English Wikipedia for langlinks doesn't work for be-tarask, but works for be-x-old to [Bug] Querying English Wikipedia for langlinks doesn't work for be-tarask, but works for be-x-old.Sep 18 2015, 1:37 PM
JanZerebecki lowered the priority of this task from Unbreak Now! to High.
JanZerebecki moved this task from incoming to consider for next sprint on the Wikidata board.
Ricordisamoa renamed this task from [Bug] Querying English Wikipedia for langlinks doesn't work for be-tarask, but works for be-x-old to [Bug] Querying Wikipedia for langlinks doesn't work for be-tarask, but works for be-x-old.Sep 18 2015, 2:02 PM

Also entries like https://www.wikidata.org/wiki/Q8937989 probably need to be updated if the language codes changed.

Mmmm... any update about this? This breaks some ContentTranslation features (such as T112285), and delays the renaming of more Wikimedia domains to standard language codes (T21986).

Restricted Application added a subscriber: JEumerus. · View Herald TranscriptJan 29 2016, 4:20 PM
Keegan added a subscriber: Keegan.Feb 2 2016, 8:33 PM
Urbanecm added a subscriber: Urbanecm.

Bugs aren't for Wikimedia-Site-requests I think.

Jarekt added a subscriber: Jarekt.May 16 2017, 12:43 PM

I just run into this issue while debugging why c:Template:Label is not working correctly for users coming from "be-tarask" wiki. I finally tracked it down to the fact that mw.wikibase.getEntity('Q1'):getSitelink( 'be-taraskwiki' ) does not return anything while mw.wikibase.getEntity('Q1'):getSitelink( 'be_x_oldwiki' ) does. What is even more confusing is that mw.wikibase.getEntity('Q1'):getLabel('be-tarask') returns a label but mw.wikibase.getEntity('Q1'):getLabel('be_x_old') does not. So for the same language "be-tarask" aka. 'be_x_old' different functions require different language codes to work.

Restricted Application added a subscriber: PokestarFan. · View Herald TranscriptJul 25 2017, 3:28 AM