Page MenuHomePhabricator

Defaulted parameter in subtemplate can't be defaulted by caller template
Open, LowPublic


Author: will.pittenger1+wikibugzilla

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

Version: 1.14.x
Severity: normal



Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:21 PM
bzimport set Reference to bz15704.
bzimport added a subscriber: Unknown Object (MLST).

will.pittenger1+wikibugzilla wrote:

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.

IAlex added a comment.Aug 24 2009, 7:18 PM
  • Bug 20269 has been marked as a duplicate of this bug. ***