Page MenuHomePhabricator

Internal link considered as an interwiki link
Closed, ResolvedPublic

Description

When using a link like [[xx:Title_page]] on a wiki whose language code is xx, we create an internal link and not an interwiki link, within MediaWiki.
But Pywikibot considers it is an interwiki link, and as a result, he moves this type of links to the bottom on the page; example using core/scripts/add_text.py

Event Timeline

Automatik raised the priority of this task from to Needs Triage.
Automatik updated the task description. (Show Details)
Automatik subscribed.

Okay I guess it happens because the prefix fr is defined via the interwiki map and thus considered an interwiki link. Now I guess the correct fix would be to compare the sites (aka if fr redirects to itself) and then don't consider it an interwiki link instead of using the language code.

jayvdb subscribed.

Youch. Im surprised our interwiki link tests didnt cover this scenario :/

Change 243639 had a related patch set uploaded (by XZise):
[FIX] getLanguageLinks: Skip own site

https://gerrit.wikimedia.org/r/243639

Change 243639 merged by jenkins-bot:
[FIX] getLanguageLinks: Skip own site

https://gerrit.wikimedia.org/r/243639

Change 243832 had a related patch set uploaded (by XZise):
[FIX] getLanguageLinks: Skip own site

https://gerrit.wikimedia.org/r/243832

Change 243832 merged by jenkins-bot:
[FIX] getLanguageLinks: Skip own site

https://gerrit.wikimedia.org/r/243832