Last modified: 2011-04-14 15:11:14 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 T17704, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 15704 - Defaulted parameter in subtemplate can't be defaulted by caller template
Defaulted parameter in subtemplate can't be defaulted by caller template
Status: NEW
Product: MediaWiki
Classification: Unclassified
Templates (Other open bugs)
1.14.x
All All
: Low normal with 1 vote (vote)
: ---
Assigned To: Nobody - You can work on this!
http://en.wikipedia.org/wiki/User:Wil...
:
: 20269 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-24 10:38 UTC by Will Pittenger
Modified: 2011-04-14 15:11 UTC (History)
3 users (show)

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


Attachments

Description Will Pittenger 2008-09-24 10:38:11 UTC
{{w:User:Will Pittenger/User Boxes/IRC/Moznet}} calls {{w:User:Will Pittenger/User Boxes/IRC}}.  In both templates, {{{Cloaked}}} and {{{Availability}}} are defaulted.  The current code defaults the values at both levels.  However, because the Moznet template has siblings which are identical except for some parameters (not the ones mentioned), it would be better to default them in the parent template (here the callee).

When the caller uses "|Cloaked={{{Cloaked|}}}", it works -- unless Cloaked wasn't passed to the Moznet template.  In that case, the parent template will see a non-blank value that just happens to look blank.

If you use "|{{#if:{{{Cloaked|}}}|Cloaked={{{Cloaked}}}}}", the parameter is passed as a numbered parameter rather than {{{Cloaked}}}.  Switching to "|Cloaked={{#if:{{{Cloaked|}}}|{{{Cloaked}}}}}" results in the problem mentioned above -- You get a blank value that isn't blank.
Comment 1 Will Pittenger 2008-09-24 10:39:21 UTC
Almost forgot: If you edit those templates, please make your own copy in a sandbox somewhere.  Remember to preserve the order.  The moznet template calls the other.
Comment 2 Alexandre Emsenhuber [IAlex] 2009-08-24 19:18:10 UTC
*** Bug 20269 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