Page MenuHomePhabricator

3D badge not shown on images in galleries
Closed, ResolvedPublic

Description

On https://fr.wikipedia.org/wiki/Kapla#Mesures_et_math%C3%A9matiques the 3D thumbnail is in a gallery, and is the only 3D file on the page. No 3D badge is shown when the page first loads:

image.png (307×259 px, 11 KB)

After opening MMV and closing, the badge is now visible:

image.png (291×226 px, 10 KB)

The badge is also visible if other 3D files are shown on the page as regular thumbnails (not in galleries).

Event Timeline

We use the onImageBeforeProduceHTML hook to check if 3D files are on the page, but apparently this doesn't run inside galleries.

Change 732728 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/3D@master] Use a different hook for detecting 3D files in the content

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

Change 732728 merged by jenkins-bot:

[mediawiki/extensions/3D@master] Use a different hook for detecting 3D files in the content

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