Page MenuHomePhabricator

Parsoid shouldn't convert external links to interwiki links when the interwiki prefix matches a local namespace name
Open, LowPublic

Description

This may be related to bug 42986: VisualEditor and Parsoid autoconvert URLs in the external link format to local links, including for interlanguage and other interwiki links.

This means that if you paste https://outreach.wikimedia.org/wiki/Example in as your link on one of the Wikipedias, it gets saved as [[outreach:Example]].

This is fabulous and should be kept.

However, if the local wiki doesn't recognize the converted prefix for the link, then the result is a redlink. At the moment, office.wiki doesn't know about the existence of outreach.wiki, but links are converted anyway.

The result is that pasting https://outreach.wikimedia.org/wiki/Example as a link on office.wiki gets saved as [[outreach:Example]], and when you click on the resulting redlink, it takes you to the non-existent page https://office.wikimedia.org/wiki/Outreach:Example

This is not so fabulous.

The most flexible system is to find out which wikis are known locally, and only convert those. The most immediate solution is probably to tell office.wiki where to find outreach.wiki.


Version: unspecified
Severity: normal

Details

Reference
bz67373

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:41 AM
bzimport added a project: Parsoid.
bzimport set Reference to bz67373.

Does this happen in VE or Parsoid? If the latter it should be moved.

This is done in Parsoid, and should normally use the wiki-local interwiki table.

It is listed in https://office.wikimedia.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap&format=json, so the Parsoid behavior looks correct. Interestingly it is listed twice though: once as 'outreach', and once at 'outreachwiki'. When I manually change the wikitext link to [[outreachwiki:Example]], it is rendered as expected.

So to me this looks either like a configuration issue in officewiki. It could also be a bug in the PHP parser, which only recognizes one of two configured interwiki prefixes.

TTO added a comment.Jul 15 2014, 7:14 AM

It's because "Outreach" is a namespace name on officewiki. So this is not a MW bug, but a bug probably in Parsoid. It shouldn't auto-convert external links to interwikis when the interwiki matches the name or alias of a local namespace.

Arlolra triaged this task as Medium priority.Nov 26 2014, 11:44 PM
Arlolra added a subscriber: Arlolra.

It's because "Outreach" is a namespace name on officewiki. So this is not a MW bug, but a bug probably in Parsoid.

I'd call that a bug in officewiki configuration. They shouldn't use a name reserved for an interwiki in their local namespaces...

ssastry assigned this task to Sbailey.Dec 15 2017, 10:20 PM
ssastry lowered the priority of this task from Medium to Low.
Aklapper edited projects, added Parsoid; removed Parsoid-Edit-Support.Feb 29 2020, 5:15 PM
Sbailey removed Sbailey as the assignee of this task.Mar 6 2020, 5:12 PM
Sbailey added a subscriber: Sbailey.