Last modified: 2014-07-18 12:13:01 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 T29745, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 27745 - References in column affect sorting (if no data-sort-type="number" attribute added to heading of column)
References in column affect sorting (if no data-sort-type="number" attribute ...
Status: NEW
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.24rc
All All
: Low enhancement with 3 votes (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 31601
  Show dependency treegraph
 
Reported: 2011-02-26 17:26 UTC by Predrag Baltic
Modified: 2014-07-18 12:13 UTC (History)
7 users (show)

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


Attachments

Description Predrag Baltic 2011-02-26 17:26:19 UTC
During the column's number sorting we have sorting based on text instead on numbers.

Example (Ascending): 
1, 10, 100... instead of 1, 2, 3...

Page:
http://sr.wikipedia.org/wiki/Spisak_država_po_stanovništvu
Comment 1 Mark Redekop 2011-04-13 15:43:24 UTC
seems fixed now, there were mixed number formats causing the error, some numbers were 1,234,567 some where 1.234.567 i've cleaned that up, of course it could also have been fixed in an update in the last month
Comment 2 wabid 2011-10-12 21:49:22 UTC
I am still seeing this bug.

see http://en.wikipedia.org/wiki/List_of_biggest_box_office_bombs and sort by worldwide theater gross.  Treasure Planet and Green Lantern are listed incorrectly.

2,986,932 20,915,465 219,851,172 22,852,487
Comment 3 kevin 2011-10-20 00:11:19 UTC
this seems to depend on references in the table. Check out [[List of NCAA football bowl records]]. The columns without references sort correctly, while the columns with references sort lexically instead. References are changing how a column is sorted: definitely a major bug.
Comment 4 kevin 2011-10-20 12:15:13 UTC
I have just been told that this is NOT a bug. The reference tag at the end of a number makes the software think it is text, rather than a number, and thus sorts it lexically rather than by value. 

Although it is technically not a "bug", it is still something that should be changed IMO. Every table on Wikipedia that has a reference should not be forced to use hidden sorting templates to make it sort correctly. I believe reference tags should be excluded, so that the software ignores them and sorts the data by value as if they were not there.
Comment 5 Andre Klapper 2013-05-17 13:42:43 UTC
Sorting on http://en.wikipedia.org/wiki/List_of_biggest_box_office_bombs both by "worldwide theater gross" and "total cost" order the numbers correctly, no matter if they have a reference tag or not.

I cannot see any obvious bug with table sorting on https://en.wikipedia.org/wiki/List_of_NCAA_football_bowl_records either anymore after playing a bit with it.

This seems to be fixed, can somebody confirm? If not, could somebody provide steps to reproduce? Thanks.
Comment 6 Bartosz Dziewoński 2013-05-17 13:55:43 UTC
(In reply to comment #4)
> I have just been told that this is NOT a bug. The reference tag at the end
> of a
> number makes the software think it is text, rather than a number, and thus
> sorts it lexically rather than by value. 

I think the table sorter still behaves like this. This can be worked around by adding a data-sort-type="number" attribute to the heading of appropriate column.
Comment 7 Andre Klapper 2013-08-14 14:30:28 UTC
This seems to be fixed, can somebody confirm? If not, could somebody provide
steps to reproduce? Thanks.
Comment 8 Bartosz Dziewoński 2013-08-14 19:38:32 UTC
It's still reproducible, it's just been worked around in the articles linked.

Older versions still exhibit the issue, e.g. for comment 2: https://en.wikipedia.org/w/index.php?title=List_of_box_office_bombs&oldid=467013275 (the workaround is the next edit).

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


Navigation
Links