Last modified: 2010-05-15 15:34:04 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 T3979, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 1979 - Template arguments not parsed.
Template arguments not parsed.
Status: RESOLVED INVALID
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.4.x
PC Windows XP
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
http://meta.wikimedia.org/wiki/Help:C...
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-26 00:08 UTC by Jamie Bliss
Modified: 2010-05-15 15:34 UTC (History)
0 users

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


Attachments

Description Jamie Bliss 2005-04-26 00:08:34 UTC
Under certain circumstances, the argument for a template will not be replaced.
As in above, the line is: 
 {{default value| array ( 'user' => 1, 'sysop' => 1, 'developer' => 1 ) }}

[[Template:Default value]] is:
 :'''Default Value''' - <code>{{{1}}}</code>

The resultant HTML code is:
 <dl>
 <dd><b>Default Value</b> - <code>{{{1}}}</code></dd>
 
 </dl>
Comment 1 Rowan Collins [IMSoP] 2005-04-26 01:33:30 UTC
(In reply to comment #0)
> Under certain circumstances, the argument for a template will not be replaced.

The argument *is* being replaced, but unfortunately the parser is seeing what
humans generally wouldn't - the text contains an "=", which is used to form
"name=value" pairs. Thus, it is not creating an unnamed parameter called "1",
it's creating a named parameter, with the name as everything to the first '='.

:: So by placing
{{{array ( 'user'}}}
:: in meta:sandbox, the following
{{meta:sandbox|array ( 'user' => 1, 'sysop' => 1, 'developer' => 1 )}}
:: becomes the following
>1, 'sysop' => 1, 'developer' => 1 )


It would be nice to have some special easy way of "escaping" instances of '='
and '|' within the template syntax, but this *is* expected behaviour. 
For now, you can work around it by replacing all '=' with the HTML escaped
version, &#61; (I've now done this in the paragraph linked)
Comment 2 Jamie Bliss 2005-04-26 02:01:59 UTC
(In reply to comment #1)
> It would be nice to have some special easy way of "escaping" instances of '='
> and '|' within the template syntax, but this *is* expected behaviour. 

<nowiki> seems work.

> For now, you can work around it by replacing all '=' with the HTML escaped
> version, &#61; (I've now done this in the paragraph linked)

This didn't seem to help, but it may have been my caching.

Anyway, <nowiki> makes more sense.

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


Navigation
Links