Page MenuHomePhabricator

Special default parameter value issue when embedding
Closed, ResolvedPublic

Description

Author: jeahra

Description:
When I use {{{parametername|default value}}} in a template, but with a question mark "?" as the default value then it only works in that template - and not when embedding it inside another template.

I assume ""(blank) is returned because it is stripped due to being a special character.
Nonetheless do I wish to use a question mark as a value, as "N/A" could be an actual value and "No information" is too long.

Using a template to insert only a question mark showed same behavior as with a parameter - eg not working when embedded.
[code]
Template:Qm
<includeonly>?</includeonly>
[/code]


Version: 1.15.x
Severity: minor

Details

Reference
bz25453

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:14 PM
bzimport set Reference to bz25453.
bzimport added a subscriber: Unknown Object (MLST).

I don't think I understand what you're trying to report. Here's what I think you're saying, please correct me if I am wrong:

template A contains
{{{foo|?}}}

Template B contains
{{A}}

Output of {{B}} on a page gives the empty string, when you expect it to give a "?".

Is that what you're reporting? If it is, that definitely should not happen.

jeahra wrote:

Yes, you understood it correctly.

Same behavior also applies to [[File:Placeholder|200px|right]], but that might not be related. On Template B no empty space box nor the button, "Add a photo", is present.

EN.WP.ST47 wrote:

Tested this in my userspace (type {{User:ST47/A}} on enwiki) output is '?'.

Closing fixed.