Support » Plugin: WP-Table Reloaded » default sort

  • Resolved RandomName

    (@randomname)


    ive got a table with 6 columns.

    im trying to prevent column 0 from being sortable and sort column 1 in ascending fashion by default.

    ive tried many custom commands strings without luck. here’s my latest:
    "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] }, { "aaSorting": [1, 'asc' ] } ]

    but the results are no good on either front. 🙁

    http://wordpress.org/extend/plugins/wp-table-reloaded/

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Please post a link to the page with the table, so that I can directly investigate this. Thanks!

    Also, note that WP-Table Reloaded has been replaced by TablePress, see http://tobias.baethge.com/2013/01/tablepress-replaces-wp-table-reloaded/ You should consider switching!

    Regards,
    Tobias

    http://www.invictusfighting.com/index.php/champions/

    gotta stick with wp 3.4.2 (which precludes me from tablepress) until they address the fatal no plugins issue with wp 3.5+ for us evil, evil windows hosts.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    thanks for the link!

    It looks like, you’ll just have to move the aaSorting command out of the aoColumns array:

    "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] } ], { "aaSorting": [1, 'asc' ] }

    Can you please try that?

    And are you sure that such a severe issue has not yet been fixed in WP 3.5.1? I can’t really believe that such a problem would not warrant immediate action (i.e. another 3.5.x release). Or is this more of a configuration issue of your server?

    Regards,
    Tobias

    sorry, no change.

    and yes, the issue is still present in 3.5.1. if it were a problem with linux hosts too, im sure it would have been fixed already. but us windows hosts are second-class citizens dont u know. 😉

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    Argh, we had too many braces… Another try:

    "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] } ], "aaSorting": [1, 'asc' ]

    Yes, Linux probably gets more attention, as it’s used more frequently. Did you look if there’s a ticket for your issue in Trac? Maybe they need more information by someone on a Windows host…

    Regards,
    Tobias

    no change still.

    while linux dominates the web server os market, windows isnt eaxctly boutique at nearly 20%. ive found that raising issues involving windows to any higher powers around here does no good. in fact, it only seems to attract persecution. so i dont make waves, lest i suffer the consequences. hopefully i havent said too much already.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    very weird. I now get a different script error, but I can’t make sense of it…
    I guess we should start over from the beginning:
    1. Does everything work if you remove the “Custom Commands” entirely?
    2. Does it work with just

    "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] } ]

    ?
    3. Does it work with just

    "aaSorting": [1, 'asc']

    ?

    Yes, and as Windows is actually used a bit, I’m surprised to hear that such an issue is not yet fixed. There’s at least one core developer who does a lot on Windows.
    And don’t worry, the devs will not persecute you based on your OS choice! 🙂
    So, you might really want to look for a ticket and add your debug details to help. Or you might actually have to create a new ticket, in case the issue hasn’t even been reported yet.

    Regards,
    Tobias

    1 – yes
    2 – yes
    3 – no (no default sort and sort selectors disappear)

    while the devs might not persecute someone for such petty reasons, there are those in power here that would. heh, ask me how i know. 😉

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    ok, thanks for testing this! Then there’s something wrong with the aaSorting command. We might have to add another pair of [] brackets:

    "aoColumnDefs": [ { "bSortable": false, "aTargets": [ 0 ] } ], "aaSorting": [[1, 'asc' ]]

    Sorry to hear that this Windows bashing happened to you. I hope that this can be fixed soon, so that you can update WordPress and then also switch to TablePress.

    Regards,
    Tobias

    that did it, thx much!

    dont worry about the windows bashing, its not ur fault. ive never seen u be anything but professional.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    very nice! Great to hear that this helped! 🙂

    And thanks for the nice words, I really appreciate it!

    Best wishes,
    Tobias

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘default sort’ is closed to new replies.