Page MenuHomePhabricator

Interwiki and Namespace prefixes are removed when creating a link, making the link a 404
Open, Needs TriagePublic

Description

I noticed that if I use [[Wikidata:Administrators' noticeboard|Text]] in a SD discussion, the prefix (Wikidata: at Wikidata) will be dropped. For example, please see this:

I inserted [[Wikidata:Wikidata:Administrators' noticeboard|Like this]]
I got [[Administrators' noticeboard|Like this]]

To reproduce, try the following here:

  1. In visual editing
  2. Write something
  3. Use the linking function and link something with Wikidata: prefix
  4. It will appear well (as blue)
  5. Save it

Event Timeline

Bencemac created this task.Jul 22 2019, 7:10 AM
Restricted Application added a project: Growth-Team. · View Herald TranscriptJul 22 2019, 7:10 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Restricted Application added a project: VisualEditor. · View Herald TranscriptJul 22 2019, 7:32 AM

@Bencemac: Which problem does this create?

Asking as you are already on wikidata, so this feels redundant (and might be an intentional feature).

@Bencemac: Which problem does this create?
Asking as you are already on wikidata, so this feels redundant (and might be an intentional feature).

It breaks the link; Administrators' noticeboard does not exist, Wikidata:Administrators' noticeboard is the correct link. Like Commons:Administrators' noticeboard.

Ah! I apologize; I missed that it's Wikidata:Wikidata: (interwiki link plus namespace) and not Wikidata: only.

Aklapper renamed this task from Prefix is dropped when I try to link to Interwiki and Namespace prefixes are removed when creating a link, making the link a 404.Jul 22 2019, 11:49 AM

This seems to be a Parsoid bug, possibly triggered by a namespace name that is the same as the local interwiki.

Input: <a href='./Wikidata:Administrators%27_noticeboard'>test</a>
Expected result: [[Wikidata:Administrators' noticeboard|test]]
Actual result: [[Administrators' noticeboard|test]]

I tested with this command, generated using https://www.wikidata.org/api/rest_v1/:

curl -X POST "https://www.wikidata.org/api/rest_v1/transform/html/to/wikitext" -H "accept: text/plain; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/wikitext/1.0.0"" -H "Content-Type: multipart/form-data" --form-string "html=<a href='./Wikidata:Administrators%27_noticeboard'>test</a>" --form-string "scrub_wikitext=true"
JTannerWMF moved this task from Inbox to External on the Growth-Team board.Jul 23 2019, 8:20 PM

Hey @SubrahamanyamVarma, we believe this is in the Parsoid wheel-house so we are moving this item to external on our board

Hey @SubrahamanyamVarma, we believe this is in the Parsoid wheel-house so we are moving this item to external on our board

Pinging the right Subbu ;) @ssastry