Forum:Tables using sortable class not working alongside tables with another class

The Final Fantasy Wiki uses a class called "table" (w:c:finalfantasy:MediaWiki:Common.css). This class adds formatting to tables so the wiki can change the design universally if it ever wishes to in the future.

The Final Fantasy Wiki also uses a class called "sortable" (w:c:finalfantasy:MediaWiki:Common.js). This uses JS to sort tables alphabetically per-column.

Once upon a time in a past MediaWiki version these two classes lived happily together. But now for some reason sortable decided it doesn't like table. It's decided that it's going to not apply the formatting specified by table to the top-row of a table where it appears.

I have my own test-wiki. I use it for testing. The code in the CSS and JS files pretty much replicate the Final Fantasy Wiki's except for a few things that have been added while testing. On my test-wiki is this: w:c:jbed:Table. Sortable and Table classes working together. But on the FFWiki? w:c:finalfantasy:List of Final Fantasy VII Items. As I said, they do not. The formatting in the first table row doesn't work properly.

So after this I suggested that the only possible cause of the problem was MediaWiki version. It was soon discovered that my test-wiki uses 1.16.5., while the FFWiki uses 1.19.1.

The reason I write this here instead of in a bug report is firstly: A bug limited to one wiki is incredibly unlikely to be fixed, especially when there's no obvious cause; and secondly: Because the problem has something to do with JavaScript(/CSS), there is likely alternative ways to code things, and maybe there's something in the JavaScript that I couldn't find that is causing the problem.

Any suggestions? JBed (talk) 16:35, August 9, 2012 (UTC)


 * Think you need to change (or add) 'table.table > tbody > tr > th' to 'table.table > thead > tr > th' Frank (Marakesh) (talk) 22:38, August 20, 2012 (UTC)
 * Oh, of course, I didn't pay close enough attention to what the JS did. Thanks. JBed (talk) 21:17, August 22, 2012 (UTC)