Last modified: 2011-04-14 15:14:07 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 T24686, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 22686 - Positional parameters override numbered parameters
Positional parameters override numbered parameters
Status: NEW
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
unspecified
All All
: Low enhancement with 2 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 23853 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-03-01 20:43 UTC by Conrad Irwin
Modified: 2011-04-14 15:14 UTC (History)
1 user (show)

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


Attachments

Description Conrad Irwin 2010-03-01 20:43:24 UTC
This is very unexpected behaviour:

{{template|1=e=mc²|Einstein}} renders like {{template|1=Einstein}}, 

I would expect it to be equivalent to render like {{template|1=e=mc²|2=Einstein}} (and {{template|{{{|e=mc²}}}|2=Einstein}}, {{template|2=Einstein|{{{|e=mc²}}}}})
Comment 1 Alexandre Emsenhuber [IAlex] 2010-06-09 09:46:33 UTC
*** Bug 23853 has been marked as a duplicate of this bug. ***
Comment 2 Waldir 2010-06-09 12:53:04 UTC
Potentially useful link and example from bug 23853, which was marked as duplicate of this one:

[[meta:Help:Template#Mix of named and unnamed parameters]] explains this
problem. The last sentence is particularly relevant: "the direct assignment of
the value '1' to parameter 3 is later overwritten by the third unnamed
parameter."

For instance, if you write {{example template|3=A|B|1=C|D|E}}, and the template
consists simply of {{{1}}}-{{{2}}}-{{{3}}}, the result would be C-D-E rather
than the more logical C-B-A (where the "first" unnamed parameter, B, takes the
place of the first unassigned numbered parameter) or C-D-A (where simply
explicitly numbered parameters take precedence over the implicit numbering).

I think the first alternative, C-B-A, makes most sense, but either approach
would be better than the current behavior.

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


Navigation
Links