Page MenuHomePhabricator

VisualEditor breaks Media links
Closed, DuplicatePublicBUG REPORT

Description

I recently added VisualEditor to my Wikis. A user reports that when editing and saving a page with a Media link like

[[Media:sample.pdf|download]]

it is transformed to

[[index.php?title=Media:sample.pdf|download]]

which breaks the link. As mentioned in T198511, using Special/Filepath instead is safe.

This happens with MediaWiki 1.39.6 and VisualEditor 0.1.2.

Event Timeline

This should work correctly if you set up short URLs on your wiki, see T270219: VisualEditor does not support wikis without short URLs and https://www.mediawiki.org/wiki/Manual:Short_URL

If you can't set up rewrite rules to get "nice" short URL, try using $wgUsePathInfo=true instead, which might work on your server and will work with VisualEditor.