Page MenuHomePhabricator

Media: links behave like File: links and do not directly take you to the media file
Closed, ResolvedPublic

Description

Media: links are mishandled in some cases.

I'll use eg. File:Glottal stop.ogg from Commons:

  1. Type "Media:Glottal stop.ogg" into search box on any wiki. It will take you to the bage with URL /wiki/Media:Glottal stop.ogg, but the headline says File:Glottal stop.ogg and that it does not exist, do you want to upload new?
  1. Type [[File:Loudspeaker.svg|10px|link=Media:Glottal stop.ogg|pronunciation]] in Sandbox. Clicking the icon-link will take you to the same page with the same behavior as described in 1).

Version: 1.24rc
Severity: normal

Details

Reference
bz16933

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:25 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz16933.
bzimport added a subscriber: Unknown Object (MLST).

(In reply to Danny B. from comment #0)

Type Media:Glottal stop.ogg into search box on any wiki. It will take you to
the bage with URL /wiki/Media:Glottal stop.ogg, but the headline says
File:Glottal stop.ogg and that it does not exist, do you want to upload new?

  1. Checked that https://commons.wikimedia.org/File:Glottal_stop.ogg still exists.
  2. Went to https://en.wikipedia.org/wiki
  3. In the search field in the upper corner, I entered Media:Glottal stop.ogg and pressed the Enter key
  4. I end up on https://en.wikipedia.org/wiki/File:Glottal_stop.ogg

-> Probably fixed in the meantime.

Obviously not, but yet worse.

The Media:Foo.ogg/jpeg/gif/etc... link is supposed to take you directly to the media file, but not to the File page. So now the "Media" namespace behaves exactly like "File", which is incorrect.

Seems somebody added Media as an alias to File?

matmarex subscribed.

I think the current behavior is intentional, it results from the fix for T34032 (8363693b77bc36b18d02cc2dc94e6c0ad3f7b0c8).

  1. When trying to view a page named "Media:Foo.jpg", the namespace acts like an alias for "File"
  2. When creating a link in wikitext like [[Media:Foo.jpg]], it links to the actual file rather than the description page

However, it seems that #2 doesn't work when used in the |link= parameter in file thumbnails. Maybe that's a separate bug. (As a workaround, you can use [[File:Loudspeaker.svg|10px|link={{filepath:Glottal stop.ogg}}|pronunciation]], since |link= works for external links as well.)