Page MenuHomePhabricator

Mangling of non existing media links by VisualEditor
Closed, ResolvedPublicBUG 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)

Event Timeline

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

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.

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

JTannerWMF added a subscriber: JTannerWMF.

This is ready for close out

marcella awarded a token.