Page MenuHomePhabricator

VisualEditor converts interwiki/Special:BookSources links to magic links
Open, LowPublic1 Estimated Story Points

Description

VisualEditor/Parsoid/whatever automatically converts links to their simplest form, i.e. [https://en.wikipedia.org/wiki/Main_Page enwiki] to [[:en:Main Page|enwiki]] (on a non-English-language Wikipedia)—and, apparently, [[pmid:123456|PMID 123456]] to PMID 123456, and [[Special:BookSources/123456789X|ISBN 123456789X]] to ISBN 123456789X, which is just the opposite of what we want to achieve. Example edit (anonymous edit, I'm sure it wasn't intentional).

Event Timeline

I don't understand. Why is this a problem? Reducing wikitext down to its simplest form seems helpful.

Because these magic links will soon be removed from MediaWiki. Bots on several wikis (including huwiki) are converting these links into internal/interwiki links or use templates containing internal/interwiki links to avoid such links simply disappearing. But it’s pointless if VE converts them back.

Because these magic links will soon be removed from MediaWiki.

I didn't know that. Can you link me to the announcement and expected timeline, so that I can plan for this? Thanks!

It’s tracked by T145604, though I think it’s one of the “will be done in two months” tasks which have not been acted on in the past years…

Deskana changed the task status from Open to Stalled.Dec 11 2017, 1:12 PM
Deskana triaged this task as Low priority.
Deskana set the point value for this task to 1.

It’s tracked by T145604, though I think it’s one of the “will be done in two months” tasks which have not been acted on in the past years…

Thanks!

That task doesn't look likely to move soon, so for now this behaviour is correct. When there is a release date set on that task, I can reprioritise this.

I think that as the transition is in progress (there are tracking categories, bot is doing the conversion), VE shouldn’t work against this. (Leaving the links as they are is OK, but I think that’s harder to implement.) I remember that it even changed {{ISBN|123-45-6789-X}} templates to plain magic links when I tested it before reporting, which is absolutely unacceptable, though I cannot reproduce this bug.

Legoktm changed the task status from Stalled to Open.Feb 10 2023, 5:37 AM
Legoktm subscribed.

This shouldn't be stalled, if VE is doing this still (I didn't check), it needs to stop. Regardless of the timeline of removing magic links, there is a pretty strong consensus that we don't want to encourage them.

This is a Parsoid bug.

$ echo '[[pmid:123456|PMID 123456]]' | cargo run --example parse
<!DOCTYPE html>
<html prefix="dc: http://purl.org/dc/terms/ mw: http://mediawiki.org/rdf/"><head prefix="mwr: https://www.mediawiki.org/wiki/Special:Redirect/"><meta charset="utf-8"/><meta property="mw:pageId" content="1423"/><meta property="mw:pageNamespace" content="0"/><meta property="mw:revisionSHA1" content="2adee735f3f27d89bb020f10000af45a850637f4"/><meta property="mw:htmlVersion" content="2.7.0"/><meta property="mw:html:version" content="2.7.0"/><link rel="dc:isVersionOf" href="//www.mediawiki.org/wiki/Main_Page"/><base href="//www.mediawiki.org/wiki/"/><title>Main Page</title><link rel="stylesheet" href="/w/load.php?lang=en&amp;modules=mediawiki.skinning.content.parsoid%7Cmediawiki.skinning.interface%7Csite.styles&amp;only=styles&amp;skin=vector"/><meta http-equiv="content-language" content="en"/><meta http-equiv="vary" content="Accept"/></head><body id="mwAA" lang="en" class="mw-content-ltr sitedir-ltr ltr mw-body-content parsoid-body mediawiki mw-parser-output" dir="ltr"><section data-mw-section-id="0" id="mwAQ"><p id="mwAg"><a rel="mw:WikiLink/Interwiki" href="https://www.ncbi.nlm.nih.gov/pubmed/123456?dopt=Abstract" title="pmid:123456" class="extiw" id="mwAw">PMID 123456</a></p>
</section></body></html>
$ echo '<a rel="mw:WikiLink/Interwiki" href="https://www.ncbi.nlm.nih.gov/pubmed/123456?dopt=Abstract" title="pmid:123456" class="extiw" id="mwAw">PMID 123456</a>' | cargo run --example convert
PMID 123456

So this is probably a subtask or duplicate of T145590: Update Parsoid to be compatible with magic links being disabled.

(note that you can manually fool Parsoid with:

$ echo '<a rel="mw:WikiLink" href="./pmid:123456">PMID 123456</a>' | cargo run --example convert
[[pmid:123456|PMID 123456]]

but that seems hacky and unreliable and doesn't fix the VE issue)

Leaving the VE tag since that's where the user impact is and not sure there isn't stuff that needs to be fixed there either.

  NODES
Bugs 2
INTERN 2
Note 2
Project 1