Page MenuHomePhabricator

MediaViewer displays each image twice when using left/right navigation
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

Another example:

What happens?:
Every image is shown twice in the MediaViewer. It's worth noting, that in the first run, MediaViewer displays usually the English caption from Commons and then the proper taken from the on-wiki caption in the second run. (Interestingly, it seems that English text is loaded only from thumbs, as the photo from infobox has twice the Polish caption displayed).

(Assuming that there are images A, B, C on the page, the MediaViewer displays them in order A, B, C, A, B, C).

What should have happened instead?:
There should be only one run of images and they should have proper captions, taken from wiki (if available).

Software version (skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

I am able to replicate this issue. Chrome, icognito mode, desktop.

The same selector a.mw-file-description img is also used to process thumbs generated by parsoid, but the parsoid selector also looks for [typeof] attribute of the parent figure, that does not exists on special page and makes it appers my patch set fix the case for the special page, but now duplicate select the thumb for parsoid. I have not a good idea to improve the selection.

Change 971279 had a related patch set uploaded (by Umherirrender; author: Umherirrender):

[mediawiki/extensions/MultimediaViewer@master] Improve a.mw-file-description selector for special pages

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

Krinkle subscribed.

Tagging CTT as this is fallout from Parsoid thumbnail work.

Thanks. @Arlolra is on sabbatical for a while and I don't know much about MediaViewer, so @Krinkle if you feel comfortable reviewing this I'd appreciate the help.

Change 971279 merged by jenkins-bot:

[mediawiki/extensions/MultimediaViewer@master] Skip thumbs from a.mw-file-description with typeof attribute

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

Umherirrender claimed this task.