Page MenuHomePhabricator

Parsoid's local interwiki link check fails on non-Wikipedia wikis
Closed, ResolvedPublic


Currently, Parsoid runs the following check to tell if an interwiki link points at the current wiki [1]:

if ( interwikiInfo.prefix === /wiki/, '' ) ) {

Obviously this is inadequate when the wiki name doesn't end in "wiki". (It's slightly unclear to me what "iwp" is; it claims to be an interwiki *prefix*, but some of the tests set it to "enwiki", so I'm assuming it's actually the DB name.)

See Currently the first link is "mw:WikiLink" and the second is "mw:ExtLink", which is wrong. The PHP parser renders them identically as internal links.


Version: unspecified
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:17 AM
bzimport set Reference to bz66709.

The MediaWiki API needs to expose the contents of $wgLocalInterwikis via the API's meta=siteinfo&prop=interwikimap. Then Parsoid will be able to consume that information.

Change 141276 had a related patch set uploaded by TTO:
Expose $wgLocalInterwikis via the API

Change 141276 merged by jenkins-bot:
Expose $wgLocalInterwikis via the API

Ok, taking this. It's related to bug 69909. We should be using localinterwiki from the siteinfo.

Change 155784 had a related patch set uploaded by Cscott:
WIP: handle local interwiki links.

Change 155784 merged by jenkins-bot:
Handle local interwiki links.