Last modified: 2014-09-17 07:08:31 UTC
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
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...
Tracked in Mingle as https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/826
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.