Description
Here is a weird bug with wikimacro parameters: depending of the order they are declared in the macro call, they do or do not fallback to their default value.
For example, a macro with 3 parameters:
- pattern
- sortyBy (with default "date")
- sortOrder (with default "descending")
calling this macro like so
{{bug
patterns=".*jpeg"
sortBy="size"
sortOrder="descending"
/}}
would give:
patterns: .*jpeg sortBy: date sortOrder: descending
whereas
{{bug
sortBy="size"
patterns=".*jpeg"
sortOrder="descending"
/}}
would show:
patterns: $wikimacro.parameters.patterns sortBy: size sortOrder: descending
Strangely enough, the sortOrder parameter is never set to its default value, whatever its order is.
You can find attached to the ticket a minimal reproduction page for this issue. Just call the macro like the one of the examples above.