Last modified: 2014-11-04 12:01:52 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 T74920, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72920 - {{!}} always treated as literal instead of separator when the template is transcluded
{{!}} always treated as literal instead of separator when the template is tra...
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-03 20:50 UTC by Diego Queiroz
Modified: 2014-11-04 12:01 UTC (History)
1 user (show)

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


Attachments

Description Diego Queiroz 2014-11-03 20:50:06 UTC
It is hard for me to describe this problem, so I made a simple (and useless) example to describe this problem.

Suppose I do have a template named "Template:A" with the content:

  {{void{{<includeonly>safesubst:</includeonly>!}}param=any}}

If I call this template with {{subst:A}} everything works as expected, since {{!}} is expanded and the generated "|" is treated as a parameter separator, so "Template:void" is called with "param=any" as parameter.  So far so good.

But, if I call this template with {{A}}, the {{!}} is expanded as literal "|" and the "Template:void|param=any" is called without parameters, which is an error.

I do not know exactly how to workaround this issue (maybe some trick I do not know).

As I stated before, this is just a minimal example, because what I really intend to do is to pass a parameter to another template only when one condition is satisfied, but I am not able to made it work when the template is both substituted or transcluded.

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


Navigation
Links