Last modified: 2014-03-11 20:14:50 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T64071, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 62071 - Edit link inconsistencies on Foreign file pages - skins which use doEditSectionLink incompatible with FileRepo
Edit link inconsistencies on Foreign file pages - skins which use doEditSecti...
Status: NEW
Product: MediaWiki
Classification: Unclassified
File management (Other open bugs)
1.23.0
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-28 20:06 UTC by Jon
Modified: 2014-03-11 20:14 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jon 2014-02-28 20:06:32 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.
Comment 1 Jon 2014-02-28 20:07:11 UTC
Apologies for the brain dump - I hope this is relatively clear.
Comment 2 Bartosz Dziewoński 2014-02-28 20:08:20 UTC
That sounds like a VE/mobile bug, the links generated by core work just fine.
Comment 3 Bartosz Dziewoński 2014-02-28 20:09:42 UTC
The VE bug for this is bug 54259.
Comment 4 Jon 2014-02-28 21:42:46 UTC
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.
Comment 5 Bartosz Dziewoński 2014-03-04 13:34:07 UTC
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.)
Comment 6 Jon 2014-03-07 19:59:59 UTC
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..
Comment 7 Max Semenik 2014-03-11 20:14:50 UTC
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/

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links