Page MenuHomePhabricator

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


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

Event Timeline

I can reproduce at, but not at, which has $wgParserEnableLegacyMediaDOM = false. This can probably be closed once that option becomes the default.

but not at, 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.