Images: {{Gallery}} template parsed differently by PHP parser and Parsoid
Open, NormalPublic


{{Gallery}} is implemented by a Lua template here:

See example below

[subbu@earth lib] cat /tmp/gallery

lines = 2
File:Arc de Triomphe de l'Etoile - Projet Chalgrin - 02.jpg1806: Architectural drawing project of [[Jean Chalgrin]]


[subbu@earth lib] node parse --dump tplsrc < /tmp/gallery


<table style="background:transparent;border:1px solid #f0f0f0;margin-top:0.5em;"><tr><td><table style="width:200px;float:left;border-collapse:collapse;margin:3px;"><tr><td style="height:200px;border:1px solid #CCCCCC;background-color:#F8F8F8;padding:0px;text-align:center;">[[File:Arc de Triomphe de l'Etoile - Projet Chalgrin - 02.jpg|center|border|180x180px|alt=|1806: Architectural drawing project of [[Jean Chalgrin]]]]</td></tr><tr style="vertical-align:top;"><td style="display:block;font-size:1em;height:3.2em;padding:0px;"><div class="gallerytext" style="height:3.1em;width:187px;line-height:1.3em;padding:2px 6px 1px 6px;overflow-y:auto;margin:0px;border:none;border-width:0px;">1806: Architectural drawing project of [[Jean Chalgrin]]&nbsp;</div></td></tr></table></td></tr></table>

So, the {{Gallery}} template emits the image in a <td> and the caption in a separate <tr> below. As far as I can tell, Parsoid therefore (correctly) duplicates the caption in both the <tr>s. However, somehow, the PHP parser magically suppresses the first caption (see

This is based on a report on VE/F @

Version: unspecified
Severity: normal


bzimport set Reference to bz57263.
ssastry created this task.Nov 19 2013, 6:30 PM
Arlolra removed GWicke as the assignee of this task.Nov 25 2014, 7:59 PM
Arlolra set Security to None.

Add Comment