Page MenuHomePhabricator

jquery.tablesorter should not interpret data-sort-value without leading zeros
Closed, ResolvedPublic


Try to sort the column which says Vertaald. The value will sort incorrectly. This only happens with Dutch as the user language.

Version: 1.20.x
Severity: normal



Event Timeline

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

The decimal point is recogognized as thousand seperator, and thus removed, causing the wrong sorting.

  • This bug has been marked as a duplicate of bug 34093 ***

Not so fast. There isn't decimal points in that column (or any column even), and it has data-sort-value in it.

The data-sort-value has a decimal point which is treated the same way it would be treated if it were plain data in a table cell, i.e. the point is removed, the result is treated as number.

Value data-sort-value sorted as
100% 1.00000 1
8% 0.08730 873
2% 0.02381 2381
10% 0.10317 10317
99% 0.99206 99206

sort-value should be treated as binary! Besides, I have not been able to reproduce this on other languages which use the same number format.

Renaming bug to be more specific. "Sorts wrong" is not helpful and not realistically fixable as it would have to cover all past and future bugs ever with sorting in jquery.tablesorter.

If there are other cases than the one I described, please create separate bugs.

Bug 27721 was similar, adding Robin to cc.

I don't know who did what, but the example url it works now.