• Resolved bedtymetales

    (@bedtymetales)


    I upgraded to version 1.8 of your plugin and then I noticed that I could no longer sort by the date. The date column of my website was sorted alphabetically. I worked on this issue for two days and then I remembered that I had just recently upgraded to 1.8. I reinstalled version 1.7 and the date sorting function now works again. It must be a glitch in the 1.8 version.

    https://bedtymetales.com/list-of-stories/fawn-spot-stories/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    I’m not sure what exact change would trigger this, but it is possible that a change in the DataTables JS library caused this. Could you maybe update to TablePress 1.8 again, so that I can see this sorting in the broken state?

    Regards,
    Tobias

    Thread Starter bedtymetales

    (@bedtymetales)

    Hi, I have updated to version 1.8 again and it is doing it again. You can see this on https://bedtymetales.com/list-of-stories/fawn-spot-stories/

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    indeed, it seems that the DataTables JS library now recognizes the data in that column as text.
    We could maybe try forcing the “date” type. For that, pleas add this to the “Custom Commands” text field on the “Edit” screen of the table:

    "columnDefs": [ { "searchable": false, "orderable": false, "targets": 0 },  { "type": "date", "targets": 2 } ]
    

    Regards,
    Tobias

    Thread Starter bedtymetales

    (@bedtymetales)

    Thank you Tobias. That worked. However, I would have to manually add that piece of code to each table and I have over 50 of them. I think I will just use version 1.7. Hopefully, this error will straighten out with the next version.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    is this really happening for all of those tables?

    If it really is, I assume that something was changed inside the DataTables JS library that TablePress uses for the sorting. I don’t have influence on that, and I’m not sure if this really is a bug or if they maybe changed that on purpose.
    Adding that “Custom Command” to affected tables would be the safest, in my opinion, as it’s always better to use the newer versions.
    (Note that the “Custom Command” from above only applies to this particular table, which uses the Counter Column Extension as well. For other tables that don’t have exactly the same structure, this might be a bit different.)

    Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Sorting Dates in Version 1.8’ is closed to new replies.