• Resolved qmolinie

    (@qmolinie)


    Hello !
    Thank you for your plugin ??
    I use a table on this page : https://www.darwin-nutrition.fr/super-aliments/spiruline/

    But some rows are not well sorted:
    – last column (%AR) sortering
    – rows “Vitamine A” and “Vitamine B1” are the biggest numbers, but are not on the top

    Would you know why ?

    I deleted then re-create the rows but it doesn’t change anything.

    Thank you very much for your help !
    Quentin

    The page I need help with: [log in to see the link]

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    The cause for this is the mixed data type, with , and % in that column. This causes the JavaScript code to sort this as text and not numbers.
    Can you maybe write the numbers with a . instead of a ,? That should be the quickest solution here.

    Regards,
    Tobias

    Back-end sorting of the table columns stopped working for me, after I upgraded WordPress to version 5.3

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi lafortuna,

    first, please try to re-install WordPress and TablePress (to be sure that all files are correct). Sometimes, during the update not all files are written to the server’s disk properly.

    If this still happens, please try again after temporarily deactivating all other plugins and after switching to a WordPress default theme like Twenty Twenty. Maybe something else is interfering here.

    Regards,
    Tobias

    P.S.: Next time, please open a new thread for your problem, instead of just writing into an existing one, thanks ??

    Tobia,

    you were right. The theme I am using, Imprint, does not function very well will WordPress 5.3.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for checking on this!

    Best wishes,
    Tobias

    Thread Starter qmolinie

    (@qmolinie)

    Hello Tobias

    Thank you for your answer
    I replaced the , by ., but it doesn’t solve the problem.
    There are no problems with sorting others columns (which have “,”), and for this last column it sorts well exception certains rows which are not well sorted in this column.

    Thanks for your help
    Quentin

    • This reply was modified 5 years, 3 months ago by qmolinie.
    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi Quentin,

    that’s weird… Maybe we need to force the correct data type then. Please add this to the “Custom Commands” text field on the “Edit” screen of the table:

    "columnDefs": [ { "type": "html", "targets": 4 } ]
    

    (You might have to flush the cache of the Autoptimize plugin so that this is properly applied.)

    Regards,
    Tobias

    Thread Starter qmolinie

    (@qmolinie)

    Thank you !
    Quentin

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

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

    Best wishes,
    Tobias

    P.S.: In case you haven’t, please rate TablePress here in the plugin directory. Thanks!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Sorting function doesn’t work for some rows’ is closed to new replies.