Page MenuHomePhabricator

Mangling of non existing media links by VisualEditor
Open, Needs TriagePublicBUG REPORT


Steps to Reproduce:

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


Actual Results:

Media link is mangled

Expected Results:

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


Related Gerrit Patches:
mediawiki/extensions/VisualEditor : masterFix mw:MediaLink support

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?


  • 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

  • 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

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