https://bugzilla.wikimedia.org/show_bug.cgi?id=46566
Web browser: ---
Bug ID: 46566
Summary: getAllExpandedArguments needs to be order preserving
Product: MediaWiki extensions
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: Unprioritized
Component: Scribunto
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected]
Classification: Unclassified
Mobile Platform: ---
getAllExpandedArguments, which is called when one uses pairs( frame.args ),
does not process the arguments in order. Under at least one circumstance this
breaks existing behavior.
Consider:
{{my_template
| top = <ref>Some Ref</ref>
| bottom = <references />
}}
In order for this to process correctly, it is required that the argument for
top= be parsed before the argument for bottom=. If they are parsed out of
order, then the references tag will render as empty because no refs have yet
been loaded.
In the current parser, in order processing is reliably performed, but it
appears that Lua getAllExpandedArguments can process these arguments in either
order. The order used appears to be stable but unpredictable, so that for a
given template it will consistently either behave correctly or incorrectly but
similarly constructed templates can work differently.
Simply running a for loop over pairs( frame.args ) and exporting the keys will
show that the ordering of the keys bears no apparent relationship to the
ordering of the input.
A consequence of this bug is discussed at:
http://en.wikipedia.org/wiki/Template_talk:Navbox#Bugs
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l