Last modified: 2010-05-15 15:38:37 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 T4920, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 2920 - empty templates should generate nothing instead of <p><br /></p>
empty templates should generate nothing instead of <p><br /></p>
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
1.5.x
All All
: Normal normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://test.leuksman.com/index.php/Te...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-07-21 07:06 UTC by lɛʁi לערי ריינהארט
Modified: 2010-05-15 15:38 UTC (History)
1 user (show)

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


Attachments

Description lɛʁi לערי ריינהארט 2005-07-21 07:06:27 UTC
Hallo!

http://test.leuksman.com/index.php/Template:4x4_type_square/T/leuksman/all#T057
is a copy of [[meta:Template:4x4_type_square/T/leuksman/all#T057]] where
*"filtering"* is aplied by replacing
{{4x4_type_square/T/leuksman/all/details|SHOWORDER2=y|SHOWORDER3=y|SHOWORDER4=y|SHOWORDER6=y|SHOWORDER8=y}}
with
{{4x4_type_square/T/leuksman/all/details|SHOWORDER2=|SHOWORDER3=|SHOWORDER4=y|SHOWORDER6=|SHOWORDER8=}}
This filtering displays only selected *"records"* and should be used in preview.

See the screen dump at:
http://jadesukka.homelinux.org:8180/betawiki/Image:Template_rendering_01.jpg

The templates
http://test.leuksman.com/index.php/Template:4x4_type_square/T/leuksman/all/show/
[[meta:Template:4x4_type_square/T/leuksman/all/show/]]
contain just
<!-- don't delete this -->
Nevertheless the *"record"* T062 at meta (and test.leuksman) would generat lots
of "<p><br /></p>" in the last cell.

<tr>
<td><font id="T064"></font><a
href="/w/index.php?title=Template:4x4_type_square/T064&amp;action=edit"
class="new" title="Template:4x4 type square/T064">T064</a></td>
<td>33 03 13 23<br />
30 00 10 20<br />
31 01 11 21<br />
32 02 12 22</td>
<td>15 04 14 01<br />

06 09 07 12<br />
03 16 02 13<br />
10 05 11 08</td>
<td align="left"> </td>
<td align="center">4</td>
<td><a href="#T064" title="">#T064</a> <a href="#T011" title="">#T011</a> <a
href="#T054" title="">#T054</a> <a href="#T001" title="">#T001</a><br />

<a href="#T001" title="">#T001</a> <a href="#T011" title="">#T011</a> <a
href="#T054" title="">#T054</a> <a href="#T064" title="">#T064</a><br />
<a href="#T054" title="">#T054</a> <a href="#T011" title="">#T011</a> <a
href="#T064" title="">#T064</a> <a href="#T001" title="">#T001</a></td>
<td><a href="/w/index.php?title=Template:4x4_type_square/T/more&amp;action=edit"
class="new" title="Template:4x4 type square/T/more">T064</a>

<p><br /></p>
<p><br /></p>
<p><br /></p>
<p><br /></p>
<p><br /></p>
<p><br /></p>
<p><br /></p>
<p><br /></p>
<p><br /></p>
<p><br /></p>
</td>
</tr>

notes on compatibility:
It is quite important to have influenece on what is generated with a template.
I can imagine that some templates are designed / specified *as the template
rendering* works in the past / works now. This will be so forever and ajustments
should / must be made.
However *no* automatisms (as insertion of code) should be done by MediaWiki
software. If someone *wants* a <br /> somewhere he / she should specify it. This
consideration should be taken into account as a basic principle and not "This
change makes harm to my template, to this and that template.", "This method
makes my life easier." etc.

Best regards Reinhardt [[user:gangleri]]

compare with bug 826: "feature request: "empty template" as
{{|parameter1|parameter2}} should be ignored"
Comment 1 lɛʁi לערי ריינהארט 2005-12-04 18:30:31 UTC
Hallo!

I found a workaround:

You can see at
http://test.leuksman.com/index.php?title=Template:4x4_type_square/T/leuksman/all/show/&diff=10118&oldid=8942
That I replaced the empty template containing just
<!-- don't delete this -->
with
&#8203;
This is
Unicode Character ZERO WIDTH SPACE - U+200B
http://www.fileformat.info/info/unicode/char/200b/index.htm
HTML Entity (decimal) &#8203; – (hex) &#x200b; – UTF-8 (hex) 0xE2 0x80 0x8B (e2808b)

in the page source of
http://test.leuksman.com/index.php/Template:4x4_type_square/T/leuksman/all#T057
you can see that the rendereing generates now

<tr>
<td> <font id="T057" /></font>

<p><a href="/edit/Template:4x4_type_square/T057" class="new" title="Template:4x4
type square/T057">T057</a>
... more ...
</td><td> <a href="/edit/Template:4x4_type_square/T/more" class="new"
title="Template:4x4 type square/T/more">T057</a>
<p>&#8203;
&#8203;
&#8203;
&#8203;
&#8203;
&#8203;
</p>
</td></tr>

This rendering is acceptable. The optimal solution would be that an empty
template or a template containing only a comment should generate *nothing*.

best regards reinhardt [[user:gangleri]]
Comment 2 lɛʁi לערי ריינהארט 2006-04-15 03:47:57 UTC
This bug report is INVALID.

See http://test.leuksman.com/view/Template:View

*note*

{{empty}}
{{empty}}
{{empty}}
{{empty}}

is equivalent with

<new line>
<new line>
<new line>
<new line>

At some point empty paragraphs are generated. Sorry for opening this bug.

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


Navigation
Links