Page MenuHomePhabricator

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

Description

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

if ( interwikiInfo.prefix === env.conf.wiki.iwp.replace( /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 http://parsoid.wmflabs.org/_rt/mediawikiwiki/VisualEditor:Local. 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.


[1] http://git.wikimedia.org/blob/mediawiki%2Fservices%2Fparsoid.git/18e31a06252db3813fe844b62f15248289cdf4cb/lib%2Fext.core.LinkHandler.js#L106


Version: unspecified
Severity: normal

Details

Reference
bz66709

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

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

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

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

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.

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

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

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