Last modified: 2010-05-15 15:33:46 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 T2662, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 662 - Templates inside template parameters
Templates inside template parameters
Status: RESOLVED WORKSFORME
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
1.4.x
All All
: Normal normal with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
: need-parsertest, parser, patch
: 895 2148 (view as bug list)
Depends on:
Blocks: 2376 3931
  Show dependency treegraph
 
Reported: 2004-10-08 02:33 UTC by Goplat
Modified: 2010-05-15 15:33 UTC (History)
6 users (show)

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


Attachments
patch (849 bytes, patch)
2004-10-08 02:34 UTC, Goplat
Details

Description Goplat 2004-10-08 02:33:27 UTC
Templates inside template parameters, e.g. {{foo|{{bar}}}}, 
don't work, the parser sees the first }} as ending foo.
Comment 1 Goplat 2004-10-08 02:34:08 UTC
Created attachment 77 [details]
patch
Comment 2 Wil Mahan 2004-10-15 19:31:23 UTC
Templates within templates like {{foo{{bar}}}} don't work, either.
The regex that replaces templates doesn't balance the braces.

Before doing something like in the attached patch, we should
make sure:
1) it's useful - I'm not sure there's any reason to make the
code more complex
2) it doesn't hurt performance
Comment 3 Egil Kvaleberg 2005-02-11 06:24:28 UTC
Templates within template arguments are defintely useful. The more templates
like infoboxes that are created, the more useful this becomes. One example: A
template for geographical coordinates (generating an uniform look as well as a
link to a map) cannot be used in templates for geographical locations :(

If there is a problem with syntax/parsing, then perhaps we can some special ugly
syntax for this case. Since 3 brackets is already used for arguments, why not go
to 4?
E.g:

{{foo{{{{bar}}}}}}
Comment 4 Egil Kvaleberg 2005-02-11 07:41:50 UTC
That said, I it seems strange from a syntax point of view why templates as
template arguments cannot be handled, when template arguments (which also
contain braces) can (for instance when using a template in another template
definition).
Comment 5 lɛʁi לערי ריינהארט 2005-06-09 06:34:16 UTC
In response to comment 0

Hallo!

The first }} should be seen as the end of the template started with the last {{.
Implementing this would solve bug 895 and would help for bug 2148.

Regards Reinhardt [[user:gangleri]]

Comment 6 Ævar Arnfjörð Bjarmason 2005-06-21 13:57:22 UTC
*** Bug 895 has been marked as a duplicate of this bug. ***
Comment 7 Jamie Bliss 2005-07-06 17:52:01 UTC
Probably related to this, "{{localurle:{{ns:4}}:Requested articles}}" don't work
under 1.5 (they did under 1.4).

The parser outputs "{{localurle:Astro73:Requested articles}}" (HTML) on my
private wiki (the meta namespace is "Astro73").
Comment 8 lɛʁi לערי ריינהארט 2005-10-26 11:05:03 UTC
testcase from http://eo.wikipedia.org/w/index.php?title=Ap%C5%9Deronsk&oldid=310604

{{Rusia urbo 2|Apsxeronsk||[[Krasnodara regiono]]|[[Apsxeronska distrikto de
Krasnodara regiono|Apsxeronska]]|[[1863]]|[[1947]]|{{Koordinatoj
gm|44|28|N|39|45|E}}|39,6 (2003)|03205501|86152|0}}

behaves differently then
the first example at http://test.leuksman.com/view/Ap%C5%9Deronsk

Note:
I will recommend the usage of distinct paramters for geographical coordinates
for this template at [[eo:]].

Regards Reinhardt [[user:gangleri]]
Comment 9 Andrius Ramanauskas 2005-10-26 12:16:07 UTC
Fix for 3526 should have fixed this
Comment 10 lɛʁi לערי ריינהארט 2005-11-08 17:29:37 UTC
changed to worksforme

http://yi.wiktionary.org/wiki/%D7%B0%D7%A2%D7%A8%D7%91
includes templates in templates at two levels

Thanks for fixing this. Best regards reinhardt [[user:gangleri]]
Comment 11 lɛʁi לערי ריינהארט 2006-01-17 14:34:52 UTC
*** Bug 2148 has been marked as a duplicate of this bug. ***

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


Navigation
Links