Page MenuHomePhabricator

Mangling of non existing media links by VisualEditor
Closed, ResolvedPublicBUG REPORT

Description

Steps to Reproduce:

[[Special:FilePath/Link to non existing file.jpg|Link to non existing file]]

(see https://fr.wikipedia.org/wiki/Utilisateur:Ti_infotrad)

Actual Results:

Media link is mangled

Expected Results:

The link should remain as is (since it was not changed)

Event Timeline

Restricted Application added a project: VisualEditor. · View Herald TranscriptSep 12 2019, 3:26 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Esanders added a subscriber: Esanders.

Could be a Parsoid issue?

Yes:

  • Excerpt or JSON returned by api.php (see Special:FilePath string)
{"visualeditor":{"result":"success","notices":[],"checkboxesDef":{"wpMinoredit":{"id":"wpMinoredit",...<a rel=\"mw:MediaLink\" href=\"./Special:FilePath/Missing_File.pdf\" resource=\"./Media:Missing_File.pdf\" title=\"Missing File.pdf\" typeof=\"mw:Error\" data-parsoid='{\"a\":{\"resource\":\"./Media:Missing_File.pdf\"},\"sa\":{\"resource\":\"media:Missing File.pdf\"},\"dsr\":[0,39,null,null]}' data-mw='{\"errors\":[{\"key\":\"apierror-filedoesnotexist\",\"message\":\"This image does not exist.\"}]}'>Missing File</a></p>\n...</section></body></html>"}}
  • Search for FilePath in Parsoid code yields a bunch of results

https://github.com/wikimedia/parsoid/search?q=%22special%3AFilePath%22&unscoped_q=%22special%3AFilePath%22

  • Multiple code edits with wikicode editor do not yield the same bug
ppelberg moved this task from To Triage to Freezer on the VisualEditor board.Sep 24 2019, 3:43 PM

I don't think it's a Parsoid issue, the resource="./Media:Missing_File.pdf" indicates the correct page and VE should be looking at that one, after the changes we made to handling media links in T198511: VisualEditor losing Media: links. But somehow the link to non-existent page is not getting handled by that code.

matmarex claimed this task.Sep 24 2019, 5:12 PM

Change 538941 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Fix mw:MediaLink support

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

Change 538941 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Fix mw:MediaLink support

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

JTannerWMF reassigned this task from matmarex to marcella.Feb 6 2020, 11:38 PM
JTannerWMF added a subscriber: JTannerWMF.

This is ready for close out

marcella closed this task as Resolved.Feb 11 2020, 6:07 PM
marcella awarded a token.
Restricted Application added a project: User-Ryasmeen. · View Herald TranscriptFeb 11 2020, 6:07 PM