Page MenuHomePhabricator

Short interwiki prefixes on testwiki point to domains that don't exist
Open, Needs TriagePublicBUG REPORT

Description

List of steps to reproduce (step by step, including full links if applicable):

What happens?:
Works:
*[[wikibooks:test]] points to https://en.wikibooks.org/wiki/test
*[[wikinews:test]] to https://en.wikinews.org/wiki/test
*[[wikiquote:test]] to https://en.wikiquote.org/wiki/test
*[[wikisource:test]] to https://en.wikisource.org/wiki/test
*[[wikiversity:test]] to https://en.wikiversity.org/wiki/test
*[[wikivoyage:test]] to https://en.wikivoyage.org/wiki/test

Not works:
*[[b:test]] to https://test.wikibooks.org/wiki/test
*[[n:test]] to https://test.wikinews.org/wiki/test
*[[q:test]] to https://test.wikiquote.org/wiki/test
*[[s:test]] to https://test.wikisource.org/wiki/test
*[[v:test]] to https://test.wikiversity.org/wiki/test
*[[voy:test]] to https://test.wikivoyage.org/wiki/test

What should have happened instead?:
As testwiki is an English SUL member I'd expect all to point to the English projects.

Event Timeline

AlexisJazz renamed this task from interwiki on testwiki points to domains that doesn't exist to Short interwiki prefixes on testwiki points to domains that doesn't exist.Feb 1 2022, 5:25 PM

Oh now I get it. For interwiki links using a short prefix "test" apparently registers as a language, even though it doesn't when creating interwiki links (entering [[w:test:Main page]] on enwiki doesn't work) and the content language for testwiki is English. But if that's the intended behavior (which I'm not entirely sure about), shouldn't the long form do the same thing? Shouldn't the long and short prefixes have the same effect regardless of the intended result?

AlexisJazz renamed this task from Short interwiki prefixes on testwiki points to domains that doesn't exist to Short interwiki prefixes on testwiki point to domains that doesn't exist.Feb 1 2022, 5:49 PM
AlexisJazz renamed this task from Short interwiki prefixes on testwiki point to domains that doesn't exist to Short interwiki prefixes on testwiki point to domains that don't exist.
Pppery subscribed.

Long-form prefixes are global and come from https://meta.wikimedia.org/wiki/Interwiki_map, always pointing to English. Short-form prefixes are special-cased in dumpInterwiki.php to go to the project in the given language. There's another task out there reporting this issue somewhere, but I can't find it right now.

(removing MediaWiki-extensions-Interwiki as this has nothing to do with that specific extension)

Oh now I get it. For interwiki links using a short prefix "test" apparently registers as a language

The word "test" is not being interpreted as a language in any of the links (that would require it to be followed by a colon); it is the wiki itself (test.wikipedia.org) that is being interpreted as a language edition of Wikipedia.

This is equivablent to, for example, the link [[b:test]] on de.wikipedia.org pointing to https://de.wikibooks.org/wiki/test .