The sortable table system in MediaWiki was completely rewritten in r86088;
unfortunately this was done without benefit of any unit testing or
regression testing, and there seem to be a lot of new bugs introduced.
I've started adding test cases for table sorting in r90595; this adds a
qunit test suite that creates some short tables (listing planets Mercury
through Saturn and their radii) and tries setting up and triggering sorting,
then compares the resulting order to the expected value.
The ascending sort by name usually works, but if called twice on two tables,
the second table usually gets sorted *completely* incorrectly. This can be
easily confirmed by manual inspection by copying a page such as
http://test.wikipedia.org/wiki/Planets_of_doom to your trunk wiki and
sorting first one table, then the other.
Numeric sorting on the radius column is also incorrect; the data set
includes values with two different orders of magnitude (> 10k and < 10k),
and they don't sort correctly. You can confirm on the test.wikipedia page
that these sort as expected in 1.17.
These specific bugs will also need to have test cases added, all of which
are claimed to be fixed by r86088 or its follow-ups:
*
https://bugzilla.wikimedia.org/show_bug.cgi?id=8028
*
https://bugzilla.wikimedia.org/show_bug.cgi?id=8115
*
https://bugzilla.wikimedia.org/show_bug.cgi?id=15406
*
https://bugzilla.wikimedia.org/show_bug.cgi?id=17141
*
https://bugzilla.wikimedia.org/show_bug.cgi?id=8732
*
https://bugzilla.wikimedia.org/show_bug.cgi?id=28775
As a reminder, you can run the qunit tests from your browser by simply going
to the tests/qunit/ subdirectory of your wiki installation.
General info:
http://www.mediawiki.org/wiki/Manual:JavaScript_unit_testing
-- brion