Page MenuHomePhabricator

gallery tag with mode=slideshow and caption=value does not display full image
Closed, ResolvedPublicBUG REPORT

Description

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

What happens?:

  • What I see is a horizontal-scrolling box with the gallery caption on the left side and a broken slideshow on the right side. Each image is displayed, but in a box that is just 100px tall, with a vertical scroll bar. The image captions are displayed in what appears to be their proper offset location at the bottom of the display area, but that ends up being at the top of each image.

What should have happened instead?:

  • Images should display in their entirety, without vertical or horizontal scroll bars.
  • Note that removing the "caption" parameter from the gallery tag appears to resolve the problem, at the expense of the desired caption.

Software version (skip for WMF-hosted wikis like Wikipedia):
en.WP as of this date stamp

Other information (browser name/version, screenshots, etc.):
Firefox for Mac, latest version.

I first noticed this problem a week or two ago, but I thought it was related to a Linter error that I was working on in a Portal page. It was reported at WP:VPT today. [https://en.wikipedia.org/wiki/Wikipedia:Village_pump_(technical)#gallery_mode="slideshow"_broken]

Event Timeline

Might be related to T242143? (The recent phab ticket about galleries)

Change 879877 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/core@master] Gallery: Fix caption in slideshows

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

Jdlrobson triaged this task as High priority.

Confirming this is a bug and related to T242143. I'm finishing for the weekend but I can look at this getting this addressed Tuesday if necessary (I'm out Monday). The caption isn't working correctly and the only workaround for now is not to use it. If anyone is able to look at this Monday, I suggest we move the caption outside the <ul> tag markup for the gallery. It's not going to be compatible with the non-JavaScript fallback otherwise. If so, https://gerrit.wikimedia.org/r/879877 is the right fix and we can get that backported.

@Jonesey95 Do we know how frequently galleries get placed inside tables like this one? It seems like the desired result is the slideshow to the right of the table - is that correct?

Yes, the gallery at 117th Congress used to float on the right of the numeric table, like an individual image does. That was the desired result.

Yes, the gallery at 117th Congress used to float on the right of the numeric table, like an individual image does. That was the desired result.

This markup seems to work:
https://en.wikipedia.org/wiki/User:Jdlrobson/gallery

This markup seems to work:
https://en.wikipedia.org/wiki/User:Jdlrobson/gallery

It looks good on normal desktop site, but overflows on x-axis if the screen width is less (desktop site on mobiles), which didn't happen earlier. And for whatever reason the numeric table just vanishes when seen in mobile site.

A very similar issue also affects <gallery mode="slideshow" showthumbnails>.

Change 881005 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@master] Revert gallery changes in 1.40.0-wmf.18

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

Change 880920 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@wmf/1.40.0-wmf.18] Revert gallery changes in 1.40.0-wmf.18

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

Change 880921 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/core@wmf/1.40.0-wmf.19] Revert gallery changes in 1.40.0-wmf.18

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

I'm proposing reverts because fixing this properly while keeping the other changes would require some changes to the parser HTML. It is possible – and a good idea – to do this, but we probably shouldn't try to implement this and coordinate it with other interested parties while we have a problem affecting articles on Wikipedia.

I scheduled the revert to be deployed tomorrow: https://wikitech.wikimedia.org/wiki/Deployments#deploycal-item-20230118T1400

I reopened T194887 and T242143, since we're now undoing the fixes for them.

Change 879877 abandoned by Jdlrobson:

[mediawiki/core@master] Gallery: Fix caption in slideshows

Reason:

Moving to https://gerrit.wikimedia.org/r/c/mediawiki/core/+/881025 in light of recent revert.

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

Change 881005 merged by jenkins-bot:

[mediawiki/core@master] Revert gallery changes in 1.40.0-wmf.18 & .19

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

Chatted to Bartosz today and we are hoping to revert changes tomorrow and try again at a later date. This one has been a bit slower than usual due to a few issues with our deployment process and the Monday US holiday. Note after the revert we will need to purge impacted pages as this concerns parser.

Thanks everyone for taking the time to report the problems and hidden complexities with this feature so we are more prepared next time round. I've improved our QA steps for next attempt.

I'm proposing reverts because fixing this properly while keeping the other changes would require some changes to the parser HTML. It is possible – and a good idea – to do this, but we probably shouldn't try to implement this and coordinate it with other interested parties while we have a problem affecting articles on Wikipedia.

Side note: Changing HTML for galleries is probably best T268250: Decide on a structure for galleries.

Change 880920 merged by jenkins-bot:

[mediawiki/core@wmf/1.40.0-wmf.18] Revert gallery changes in 1.40.0-wmf.18

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

Mentioned in SAL (#wikimedia-operations) [2023-01-18T14:51:33Z] <lucaswerkmeister-wmde@deploy1002> Started scap: Backport for [[gerrit:880920|Revert gallery changes in 1.40.0-wmf.18 (T326990)]]

Mentioned in SAL (#wikimedia-operations) [2023-01-18T14:53:20Z] <lucaswerkmeister-wmde@deploy1002> lucaswerkmeister-wmde and matmarex: Backport for [[gerrit:880920|Revert gallery changes in 1.40.0-wmf.18 (T326990)]] synced to the testservers: mwdebug2002.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug2001.codfw.wmnet, mwdebug1001.eqiad.wmnet

Change 880921 merged by jenkins-bot:

[mediawiki/core@wmf/1.40.0-wmf.19] Revert gallery changes in 1.40.0-wmf.18 & .19

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

Mentioned in SAL (#wikimedia-operations) [2023-01-18T15:04:37Z] <lucaswerkmeister-wmde@deploy1002> Finished scap: Backport for [[gerrit:880920|Revert gallery changes in 1.40.0-wmf.18 (T326990)]] (duration: 13m 04s)

Mentioned in SAL (#wikimedia-operations) [2023-01-18T15:05:05Z] <lucaswerkmeister-wmde@deploy1002> Started scap: Backport for [[gerrit:880921|Revert gallery changes in 1.40.0-wmf.18 & .19 (T326990)]]

Mentioned in SAL (#wikimedia-operations) [2023-01-18T15:06:51Z] <lucaswerkmeister-wmde@deploy1002> lucaswerkmeister-wmde and matmarex: Backport for [[gerrit:880921|Revert gallery changes in 1.40.0-wmf.18 & .19 (T326990)]] synced to the testservers: mwdebug2001.codfw.wmnet, mwdebug1002.eqiad.wmnet, mwdebug1001.eqiad.wmnet, mwdebug2002.codfw.wmnet

Mentioned in SAL (#wikimedia-operations) [2023-01-18T15:14:16Z] <lucaswerkmeister-wmde@deploy1002> Finished scap: Backport for [[gerrit:880921|Revert gallery changes in 1.40.0-wmf.18 & .19 (T326990)]] (duration: 09m 11s)