Page MenuHomePhabricator

via attribution link provides wrong mediaviewer link
Closed, ResolvedPublic

Description

MediaViewer provides wrong link on de.wp for commons files when using the "You need to attribute the author" option.

The text produces is:

„Viglius van Aytta“ von Frans Pourbus der Ältere - http://www.insecula.com/oeuvre/photo_ME0000058875.html. Lizenziert unter Public domain über Wikimedia Commons - https://commons.wikimedia.org/wiki/File:Viglius_van_Aytta.JPG#mediaviewer/Datei:Viglius_van_Aytta.JPG

But the last link does not work due to the localized "Datei" for german "File" in it. So, for commons file use the canonical namespace as in the first part of the url.
Bad:
https://commons.wikimedia.org/wiki/File:Viglius_van_Aytta.JPG#mediaviewer/Datei:Viglius_van_Aytta.JPG

Better:
https://commons.wikimedia.org/wiki/File:Viglius_van_Aytta.JPG#mediaviewer/File:Viglius_van_Aytta.JPG

From https://de.wikipedia.org/wiki/Liste_bekannter_Pers%C3%B6nlichkeiten_der_Universit%C3%A4t_L%C3%B6wen#mediaviewer/Datei:Viglius_van_Aytta.JPG


Version: unspecified
Severity: normal

Details

Reference
bz69956

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:38 AM
bzimport added a project: MediaViewer.
bzimport set Reference to bz69956.
bzimport added a subscriber: Unknown Object (MLST).

It is wrong in all options, also "share" and "embed".

Not to mention that PD is not a license :)

The path for this code is.
mmv.EmbedFileFormatter.js:getCreditHtml()
mmv.EmbedFileFormatter.js:getLinkUrl()
mmv.routing.Router.js:createdHashedUrl()
mmv.routing.Router.js:createHash()
mw.Title:getPrefixedDb()

createdHashedUrl() combines the descriptionUrl with 'shared' context, with the hash which has a 'local' context..

If I understand correctly, the Route, is basically what defines the hash for media viewer. In that case the above combination is broken by definition, because is combines something with a remote and a local context...

Change 156163 had a related patch set uploaded by MarkTraceur:
Fix link to media viewer with proper namespace

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

Change 156163 merged by jenkins-bot:
Fix link to media viewer with proper namespace

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

Confirmed, works as advertised.