Page MenuHomePhabricator

Sort function with icon works only once
Closed, InvalidPublic

Description

Author: erethyias

Description:
Hello,

we are using icons in the header of a table (see the code below):

Mitglieder:

{| class="wikitable sortable" style="text-align: center;"

-

! Name Rang [[File:alchemie.png|32px]] !!

}

[[Category:Gilde]]

When a user is toggle the triangle to ascending or descending the results, it works only once. After that the user needs to refresh the whole site, otherwise the sort function doesnt work.

Is there any workaround?

Cheers, Sascha


Version: 1.23.6
Severity: normal

Details

Reference
bz73312

Event Timeline

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

Thanks for taking the time to report this!
Which MediaWiki version is this about and is there a public testcase?

erethyias wrote:

Hello Andre,

its testable on our wiki site, which is http://wiki.insane-archeage.com/index.php?title=Mitglieder

We are using the version 1.23.6 of MediaWiki (i also updated it at the top).

Cheers, Sascha

Using http://wiki.insane-archeage.com/index.php?title=Mitglieder&debug=true and the browser console I get:

TypeError: parsers[j] is undefined

for /resources/src/jquery/jquery.tablesorter.js line 218 which is:

for ( var j = 0; j < totalCells; ++j ) {
cols.push( parsers[j].format( getElementSortKey( $row[0].cells[j] ),

table, $row[0].cells[j] ) );

}

erethyias wrote:

Good morning Andre,

is this a bug in MediaWiki? Or did i some wrong configurations by installing MediaWiki?

Cheers, Sascha

I don't know - I'm not a developer. :)

Your table is malformed

The majority of rows is missing two cells at the end.

Having said that, I should add a null check there, and throw a warning with a hint as to the cause, when this happens.

erethyias wrote:

I fixed the malformed table (by adding the missing cells).

And now the sort function works properly.

It was very helpful

Cheers, Sascha

No code was fixed in the codebase, hence closing as INVALID.