Page MenuHomePhabricator

Numbers passed to $ variables in MediaWiki:Categorytree-member-num must not be formatted but raw
Closed, ResolvedPublic

Description

Numbers passed to $ variables in MediaWiki:Categorytree-member-num must not be formatted but raw. If parser functions are used in such message, then they crash if the number is bigger than 999 and formatted with space as thousand separator.

Seems to me as a regression because I never noticed such issue before.


Version: unspecified
Severity: major

Details

Reference
bz40151

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:47 AM
bzimport set Reference to bz40151.
bzimport added a subscriber: Unknown Object (MLST).

Having the numbers properly internationalised is the issue that was resolved. Using parserfunctions on MediaWiki:Categorytree-member-num was not an explicitely supported use case. I updated the component to ParserFunctions, as that one is apparently borking.

The quick fix is to probably provide an additional (unformatted and unused) parameter to 'categorytree-member-num' so the use case mentioned above can be salvaged.

I'll have a look if there are additional parameters that would need this in CategoryTree.

The issue summary should probably be updated to indicate where the root cause for the observed behaviour lies (in that ParserFunctions does not handle localised numbers).

Patch available in gerrit 23476.

{{FORMATNUM:$1|R}} also exists but that wouldn't keep BC.

See bug 22798
and see also bug 29357, delete MediaWiki:Categorytree-member-num and have a look, if parser functions needed anymore for your case

This is a categorytree bug, the problem that Extension ParserFunctions does not handle localized numbers should be another bug (or maybe is)