Last modified: 2014-03-11 20:14:50 UTC
Navigate to https://commons.wikimedia.org/wiki/File:Apthorp_south_jeh.JPG Now navigate to the same page via a ForeignAPI https://en.wikipedia.org/wiki/File:Apthorp_south_jeh.JPG Notice that in the latter a broken VisualEditor link appears. Expected: No VisualEditor link Similarly if you go to the mobile site you will see the same problem - an edit link appears in square brackets rather than an edit icon (see bug 61807). The mobile skin uses doEditSectionLink which seems to be incompatible with FileRepo. I've spent the morning talking with Brion to understand more about how the magic commons file page works and how the page is rendered. Basically the problem is in FileRepo.php getDescriptionRenderUrl creates an API request to something akin to https://commons.wikimedia.org/w/index.php?title=Image:Apthorp_south_jeh.JPG&action=render&uselang=en If we can route this through the current skin this problem goes away. e.g. https://commons.wikimedia.org/w/index.php?title=Image:Apthorp_south_jeh.JPG&action=render&uselang=en&useformat=mobile or https://commons.wikimedia.org/w/index.php?title=Image:Apthorp_south_jeh.JPG&action=render&uselang=en&useskin=vector Brion is taking a look to see if he can add a hook.
Apologies for the brain dump - I hope this is relatively clear.
That sounds like a VE/mobile bug, the links generated by core work just fine.
The VE bug for this is bug 54259.
Thanks for clarifying the VE issue is a different problem. Compare results of https://commons.wikimedia.org/w/index.php?title=Image:Apthorp_south_jeh.JPG&action=render&uselang=en&useskin=vector https://commons.wikimedia.org/w/index.php?title=Image:Apthorp_south_jeh.JPG&action=render&uselang=en&useformat=mobile (triggers useskin=minerva but minerva is unregistered so this is needed) The MinervaSkin overrides doEditSectionLink. There may be other skins that also override it and will thus be inconsistent.
Hmm. You seem to be requesting the same thing as bug 19415 here – I already tried to fix it once, but there were complications. There's a patch there that needs to be reworked. (On a side note, my personal opinion about doEditSectionLink is that it should die in a fire and you should style the section edit links with CSS, as I made it possible to easily hide the brackets a few months ago.)
Actually in the case of the file page we would like to render the edit links and make it possible to edit the content (albeit on a foreign wiki) So really it would be great if this could just pass the current skin name along with the request..
Making FileRepo stuff depend on current skin would be horrible, also there's a problem with permissions/being logged in on foreign wiki which makes displaying edit links unreliable. However, I redid Bartosz's fix for bug 19415 in https://gerrit.wikimedia.org/r/#/c/118135/