Last modified: 2014-09-23 17:29:24 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T68709, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 66709 - Parsoid's local interwiki link check fails on non-Wikipedia wikis
Parsoid's local interwiki link check fails on non-Wikipedia wikis
Status: RESOLVED FIXED
Product: Parsoid
Classification: Unclassified
token-stream transforms (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: C. Scott Ananian
:
Depends on:
Blocks: 45209
  Show dependency treegraph
 
Reported: 2014-06-17 10:21 UTC by This, that and the other (TTO)
Modified: 2014-09-23 17:29 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description This, that and the other (TTO) 2014-06-17 10:21:49 UTC
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
Comment 1 This, that and the other (TTO) 2014-06-17 10:22:08 UTC
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.
Comment 2 Gerrit Notification Bot 2014-06-22 05:26:42 UTC
Change 141276 had a related patch set uploaded by TTO:
Expose $wgLocalInterwikis via the API

https://gerrit.wikimedia.org/r/141276
Comment 3 Gerrit Notification Bot 2014-06-23 13:55:04 UTC
Change 141276 merged by jenkins-bot:
Expose $wgLocalInterwikis via the API

https://gerrit.wikimedia.org/r/141276
Comment 4 C. Scott Ananian 2014-08-22 18:48:24 UTC
Ok, taking this.  It's related to bug 69909.  We should be using localinterwiki from the siteinfo.
Comment 5 Gerrit Notification Bot 2014-08-22 19:16:35 UTC
Change 155784 had a related patch set uploaded by Cscott:
WIP: handle local interwiki links.

https://gerrit.wikimedia.org/r/155784
Comment 6 Gerrit Notification Bot 2014-08-25 17:09:08 UTC
Change 155784 merged by jenkins-bot:
Handle local interwiki links.

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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links