Last modified: 2010-05-15 15:33:46 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 662 - Templates inside template parameters
Templates inside template parameters
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
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: ---

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

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]
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?

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
Comment 5 lɛʁi לערי ריינהארט 2005-06-09 06:34:16 UTC
In response to comment 0


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

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

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