https://bugzilla.wikimedia.org/show_bug.cgi?id=57263

       Web browser: ---
            Bug ID: 57263
           Summary: Images: {{Gallery}} template parsed differently by PHP
                    parser and Parsoid
           Product: Parsoid
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: General
          Assignee: gwi...@wikimedia.org
          Reporter: ssas...@wikimedia.org
                CC: ssas...@wikimedia.org
    Classification: Unclassified
   Mobile Platform: ---

{{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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to