WordPress.org

Forums

WP-Table Reloaded
[resolved] default sort (12 posts)

  1. RandomName
    Member
    Posted 2 years ago #

    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/

  2. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    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

  3. RandomName
    Member
    Posted 2 years ago #

    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.

  4. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    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

  5. RandomName
    Member
    Posted 2 years ago #

    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. ;)

  6. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    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

  7. RandomName
    Member
    Posted 2 years ago #

    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.

  8. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    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

  9. RandomName
    Member
    Posted 2 years ago #

    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. ;)

  10. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    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

  11. RandomName
    Member
    Posted 2 years ago #

    that did it, thx much!

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

  12. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    very nice! Great to hear that this helped! :-)

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

    Best wishes,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP-Table Reloaded
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.