Page MenuHomePhabricator

MMV uses incorrect caption for images included in the caption of an image
Open, LowPublicBUG REPORT

Description

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

  • Transclude the following snippet
[[File:Leonardo da Vinci - Self-Portrait - WGA12798.jpg|thumb|Sogenanntes 
[[File:Firma de Leonardo Da Vinci.svg|right|frameless|da Vincis Signatur]]]]
  • Click on the signature to open in MMV

What happens?:
The caption is "Sogenanntes", which is the caption of the other image

What should have happened instead?:
The caption should have been "da Vincis Signatur", the alt of the signature image

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

Other information (browser name/version, screenshots, etc.):
This is because the findcaption logic doesn't realize that this image is inside a thumbcaption

Original report was https://de.wikipedia.org/w/index.php?title=Leonardo_da_Vinci&oldid=227253935

Event Timeline

I can reproduce at https://en.wikipedia.beta.wmflabs.org/wiki/T321442, but not at https://test2.wikipedia.org/wiki/T321442, which has $wgParserEnableLegacyMediaDOM = false. This can probably be closed once that option becomes the default.

but not at https://test2.wikipedia.org/wiki/T321442, which has $wgParserEnableLegacyMediaDOM = false.

Although, note that the caption for the outer image includes the caption for the nested image, because of the non-displayed figcaption in the html.