• Resolved Shonari

    (@shonari)


    First of all amazing plugin!

    So I uploaded a file via csv and added it to the front end of my site, when i tried to sort a column in ascending/descending order the numbers become jumbled and are not sorted at all. I uploaded five similar csv’s and this only happens with two of them.

    I went back to the csv and ensure that the numbers were formatted as numbers and re-uploaded but alas, same issue.

    Please visit link to page with tables: https://fit.ky/results/

    Just change the year to 2013 for the table with the problem and 2011 for the table without it.

    Cheers

    PS If you are wondering, the tables are hidden using conditional logic via the plugin gravity forms

    https://www.ads-software.com/plugins/tablepress/

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

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    Which columns are you refering to in that table? From what I can see, the problem basically is that not all columns contain plain numbers. Most columns contain time values, for which the DataTables JS library (whcih TablePress uses for the sorting) does not always have a sorting algorithm. Other columns contain text/strings or things like 1/61 which also is a string and not a number. And in the first column, the problem is near the bottom of the table: The extra DNF in the cells makes the JS library use a string sorting algorithm for the first column. For the first, column this can however be fixed easily, by forcing a more sophisticated algorithm on that first column. For that, please see this TablePress Extension: https://tablepress.org/extensions/datatables-sorting-plugins/

    Regards,
    Tobias

    Thread Starter Shonari

    (@shonari)

    Aaah! AMAZING! Installed the plugin and voila!

    Thanks for your awesome support and even more awesome plugin!

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    no problem, you are very welcome! ?? Good to hear that this helped!

    Best wishes,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Sorting not working correctly TablePress’ is closed to new replies.