Last modified: 2010-05-15 15:33:42 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 T3598, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 1598 - Transclusion of templates with tables inserts excess whitespace
Transclusion of templates with tables inserts excess whitespace
Status: RESOLVED DUPLICATE of bug 1343
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.4.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/User:Fla...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-02-26 07:03 UTC by flamurai
Modified: 2010-05-15 15:33 UTC (History)
1 user (show)

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


Attachments

Description flamurai 2005-02-26 07:03:46 UTC
In templates that consist of tables, every transclusion after the first inserts
excess whitespace in the form of <p><br /></p> above the transclusion.

Reduced test case: [[User:Flamurai/Transclusion]]


Real world example: [[Names of God in Judaism]]. The code is:

... use God's name in a similar fashion.
{{listen|filename=He-El.ogg|title=El|description=|format=[[Ogg]]}}

This produces the HTML:

use God's name in a similar fashion.</p>
<p><br /></p>
<table cellspacing="0" border="0" align="left" style="
margin-left: 0.5em; color: inherit; background-color: transparent; position:
relative; left: -8px;">
<tr style="vertical-align: top;">
<td rowspan="3" style="width: 30px; padding-right: 3px; padding-top: 4px;
vertical-align: top;">
...

That <p><br /></p> is producing excess whitespace. 

However, the first time the template's included there's no problem with the code:

... sometimes used to refer to a distinguished person.
{{listen|filename=He-Adonai.ogg|title=Adonai|description=}}

Which results in:

... is sometimes used to refer to a distinguished person.</p>
<table cellspacing="0" border="0" align="left" style="
margin-left: 0.5em; color: inherit; background-color: transparent; position:
relative; left: -8px;">
<tr style="vertical-align: top;">
<td rowspan="3" style="width: 30px; padding-right: 3px; padding-top: 4px;
vertical-align: top;">

That extra paragraph is not there. This problem is also on [[History of music]].
Comment 1 Zigger 2005-02-26 07:58:34 UTC
See also bug 1343 and bug 1176.
Comment 2 flamurai 2005-02-26 17:26:58 UTC
After checking the bug 1343 and bug 1176 and doing some further testing, I've
noticed a few things:

1. This only applies to templates that are wikitables, not to divs, HTML tables,
etc.
2. The same phenomenon happens every time for each separate template. That is,
if I use {{table1}} and {{table2}} multiple times, for each one, the first use
will be fine, and every use thereafter will have excess whitespace.
3. If the template is the first element in the page, the problem is exactly the
opposite! There is whitespace before the first transclusion, but every
transclusion thereafter is fine.

I updated [[User:Flamurai/Transclusion]] to encompass all these cases.
Comment 3 flamurai 2005-02-26 23:07:09 UTC
A temporary hack to fix this is to wrap the table in <div>...</div>, however the
parser bug should still be found and fixed.
Comment 4 Ævar Arnfjörð Bjarmason 2005-04-12 03:20:04 UTC
Marking it as a duplicate of bug 1343, which I solved 3 days ago.

*** This bug has been marked as a duplicate of 1343 ***

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


Navigation
Links