Page MenuHomePhabricator

<gallery> rendering difference in packed mode
Closed, ResolvedPublic

Description

Look at Parsoid vs Legacy.

If you look at the source for that gallery, the second line is just a File: prefix (localized to the wiki) without any image. Legacy seems to ignore those, but Parsoid rendering something for it.

This is likely a WONT-FIX since Parsoid needs to rt-back content on edits. But, filing this phab task to record it if we decline it. But, we could perhaps add a lint (or update any existing lints for this).

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

the second line is just a File: prefix (localized to the wiki) without any image. Legacy seems to ignore those, but Parsoid rendering something for it.

I think that's a red herring,

$ echo "<gallery>\nFile:\n</gallery>" | php bin/parse.php
<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt1" data-parsoid='{"dsr":[0,26,9,10]}' data-mw='{"name":"gallery","attrs":{},"body":{}}'>
</ul>

$ echo "<gallery>\nНяйф:\n</gallery>" | php bin/parse.php --domain mdf.wikipedia.org
<ul class="gallery mw-gallery-traditional" typeof="mw:Extension/gallery" about="#mwt1" data-parsoid='{"dsr":[0,30,9,10]}' data-mw='{"name":"gallery","attrs":{},"body":{}}'>
</ul>

Change #1191212 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/services/parsoid@master] Packed mode gallery images have min 60px

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

ABreault-WMF renamed this task from <gallery> rendering difference for missing images to <gallery> rendering difference in packed mode.Sep 25 2025, 7:16 PM

Change #1191492 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/core@master] Add file to ParserTestRunner to test gallery packed mode

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

Change #1191492 merged by jenkins-bot:

[mediawiki/core@master] Add file to ParserTestRunner to test gallery packed mode

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

Change #1191212 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Packed mode gallery thumbs have min 60px width

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

Change #1193889 had a related patch set uploaded (by OSleger; author: OSleger):

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.22.0-a26

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

Change #1193889 merged by jenkins-bot:

[mediawiki/vendor@master] Bump wikimedia/parsoid to 0.22.0-a26

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