Last modified: 2013-12-04 01:52:09 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T59263, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 57263 - Images: {{Gallery}} template parsed differently by PHP parser and Parsoid
Images: {{Gallery}} template parsed differently by PHP parser and Parsoid
Status: NEW
Product: Parsoid
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal normal
: ---
Assigned To: Gabriel Wicke
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-19 18:30 UTC by ssastry
Modified: 2013-12-04 01:52 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description ssastry 2013-11-19 18:30:21 UTC
{{Gallery}} is implemented by a Lua template here: https://en.wikipedia.org/wiki/Module:Gallery

See example below

[subbu@earth lib] cat /tmp/gallery
{{Gallery
| lines = 2
| File:Arc de Triomphe de l'Etoile - Projet Chalgrin - 02.jpg|1806: Architectural drawing project of [[Jean Chalgrin]]
}}
[subbu@earth lib] node parse --dump tplsrc < /tmp/gallery
=================================
Template: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 https://en.wikipedia.org/w/index.php?title=User:Ssastry/sandbox&oldid=582405791)

This is based on a report on VE/F @ https://en.wikipedia.org/w/index.php?title=Wikipedia:VisualEditor/Feedback&oldid=582367222#Pages_that_go_wrong_in_VE

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links