Last modified: 2014-11-17 10:36:46 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 T33527, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31527 - jquery.tablesorter's data-sort-type feature not working for wikitext tables on WMF
jquery.tablesorter's data-sort-type feature not working for wikitext tables o...
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JavaScript (Other open bugs)
1.18.x
All All
: Normal enhancement with 3 votes (vote)
: ---
Assigned To: Krinkle
:
: 39055 (view as bug list)
Depends on: 27478
Blocks: 31601
  Show dependency treegraph
 
Reported: 2011-10-08 13:35 UTC by Derk-Jan Hartman
Modified: 2014-11-17 10:36 UTC (History)
7 users (show)

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


Attachments

Description Derk-Jan Hartman 2011-10-08 13:35:31 UTC
The WMF 1.18 deploys don't seem to allow the data-sort-type attribute which affects the functionality of the table sorter (making it all but useless)

I think this might be a simple setting, but not sure, could also be something that is not deployed to 1.18wmf1
Comment 1 Derk-Jan Hartman 2011-10-09 22:02:03 UTC
data-* not working because wiki's were not switched to html5 as we once planned. This makes the tablesorter code problematic, because the mixed content mode of the new table sorter is much less resilient than the one of the old table sorter.
Comment 2 Krinkle 2011-10-09 22:13:55 UTC
Both 1.18wmf1 or 1.18.0 of MediaWiki's version of jquery.tablesorter module supports the data-sort-type attribute. This works on third-party wikis as well as on [[mw:]].

However for tables generated from wikitext, MediaWiki (as usually, and independant from the tablesorter script) strips data-* attributes on wikis that still have wgHtml5 set to false (i.e. 99% of wmf wikis). 

mediawiki.org is one of few wikis that does have wgHtml5 set to true, and the new data-sort-type attribute functionality works fine there.

The old tablesorter script wasn't very flexible in sorting, it did everything with detection and was less strict in cases were there was mixed types of content. This also caused several bugs.

The new tablesorter script has fewer bugs in sorting, afiak still allows and supports mixed content and. And as a new feature, it can be forced a certain type with the data-sort-type attribute. This latter feature does not work for tables generated from wikitext – if wgHtml5 is false.
Comment 3 Krinkle 2011-10-09 22:17:21 UTC
Rephrasing bug, adding dependency on bug 27478 and including in title that's about tables from wikitext (to which the stripping of attributes applies). I think it does work for extensions outputting attributes directlty (I remember some CentralAuth-related SpecialPage being sortable)
Comment 4 Tisza Gergő 2012-02-19 09:02:37 UTC
There is a class-based metadata format the tablesorter could use which is compatible with HTML 4 (though the data-* options are also compatible if you don't mind your document not being 100% valid): class="foo {sort-type:'number'} bar"

Tablesorter uses the jquery.metadata plugin for that though, which is not present.
Comment 5 Krinkle 2012-08-07 03:56:20 UTC
*** Bug 39055 has been marked as a duplicate of this bug. ***

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


Navigation
Links