Okay
  Public Ticket #3591345
bug with filters
Closed

Comments

  • Pierre-Eloi started the conversation

    Hello, for nearly a month, the filters have not been working. I have an SQL query to build a table, and we could filter. Now, when trying to filter a column, we get "Aucun élément à afficher". Are you familiar with this issue? Any logs for you to check? Thank you and see you soon. Pierre-Eloi

  •  1,845
    Miloš replied

    Hello,

    To begin, I want to extend my heartfelt apologies for the delayed reply, 

    which is due to an unexpectedly high volume of inquiries. 

    We truly value your patience during this period.


    Can you check how many Rows your Table has?

    Maybe you had less than 2 thousand rows before, when the filters were working i presume - then after some time it reached 2000 rows - and activated server-side option?

    8409576004.png

    When the server-side option is activated, this adds an additional layer of SQL processing in our Plugin.

    We will elaborate on that.


    Our logic is based on a PHP SQL parser which has full support for the SQL dialect for the following statement types

    SELECT, INSERT, UPDATE, DELETE, REPLACE, RENAME, SHOW, SET, DROP, CREATE INDEX, CREATE TABLE, EXPLAIN and DESCRIBE.

    Some of them are disabled for security reasons.

    Filtering, sorting, and search may not work properly if you include:

    • Accent graves ( ` ) around the table name
    • JOIN functions
    • UNION functions
    • CONCAT functions
    • sub-queries

    -

    So, first you can check for accent graves around the table name, if you have this, remove it...

    Then, see if you used CONCAT to create any column.

    If so, go into this column setting, and disable it from "global search" in the Filtering tab.

    -

    7138515403.png

    -

    If none of that helps,

    you can try preparing a MySQL view (which will return the data that you need, call it e.g. “view1” and then build a wpDataTables based on a simple query like "SELECT * FROM view1″.

     If you need help with that, you can see our video, where we show an example of using View in our plugin.

    -

    Let me know If that helped.

    Thank yousmile.png

    Kind Regards, 

    Miloš Jovanović
    [email protected]

    Rate my support

    wpDataTables: FAQ | Facebook | Twitter | InstagramFront-end and back-end demo | Docs

    Amelia: FAQ | Facebook | Twitter | InstagramAmelia demo sites | Docs | Discord Community

    You can try wpDataTables add-ons before purchasing on these sandbox sites:

    Powerful Filters | Gravity Forms Integration for wpDataTables | Formidable Forms Integration for wpDataTables | Master-Detail Tables

  • Pierre-Eloi replied

    Hello Miloš

    Thanks for your reply!

    It works with MySQL View  : SELECT * FROM view2 ! Thank you!

    More informations about my issue (for your information) :

    - my SQL query shows 2106 rows on 16497 rows (total in jc_posts table)
    - my SQL query works
    - it's when i want to filter the results that it displays "Aucun élément à afficher" but with the number of results above the table "Affichage de l'élément 1 à 16 sur 16 éléments (filtré de 16,497 éléments au total)"
    - "server-side option" is checked

    Thanks again for your help

    Bests regards

    Pierre-Eloi


  •   Miloš replied privately
  • Pierre-Eloi replied

    Hello Miloš,

    I added a 5* review !

    Kind regards

    Pierre-Eloi

  •   Miloš replied privately