Okay
  Public Ticket #2820434
A Error JS Error when filtering
Closed

Comments

  • hedi started the conversation

    Hello
    When Filtering Date i got this error. 

    wdt.frontend.min.js?ver=3.4.4:8 Uncaught Error: DataTables warning: table id=table_1 - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1
        at K (wdt.frontend.min.js?ver=3.4.4:8)
        at Object.error (wdt.frontend.min.js?ver=3.4.4:7)
        at c (jquery.min.js?ver=3.5.1:2)
        at Object.fireWith [as rejectWith] (jquery.min.js?ver=3.5.1:2)
        at l (jquery.min.js?ver=3.5.1:2)
        at XMLHttpRequest.<anonymous> (jquery.min.js?ver=3.5.1:2)

  • [deleted] replied

    Hi Hedi

    Thank you for reaching out to us.

    JSON errors usually occur if you have a security plugin installed, or there's a security measure blocking admin-ajax calls. Also, if the pages are cached, it can occur. Try excluding pages where you have our tables loaded from being cached, and try again.

    If there's a notice, warning or fatal error WordPress that manifests through responses. Our table requires a valid JSON in the response, so if there are these notices, the JSON is not valid, and the data is not being loaded.


  •   hedi replied privately
  • [deleted] replied

    Hi Heidi

    Could you please send us the SQL query used to create the table so we can try and recreate the issue on our end? 


  • hedi replied

    thank you for Answering


    SELECT * FROM `reifens`

  • [deleted] replied

    You are most welcomesmile.png

    Could you please remove the accent graves and let me know if you are experiencing the same issue?

    Also if you have a semicolon please remove that as well as it also causes issues in wpDataTables.

  • hedi replied

    This was the solution. Only one thing rest: 

    When i add the Date Filter it do not filter by date. It only filter by the Day. As soon as i add the seperator (13.07. oder 13-07 oder 13/...etc) the result turns into 0. 



  • [deleted] replied

    I assume you have set the filtering type to Text? I would recommend changing that to a datepicker so you don't have issues like that.

    1545785173.png


    You can also check your general settings to see what is the date format you are using and try adding that selector

    4027436468.png


  • hedi replied

    Ok, Thank you, this helped. Realy last Question: 


    When filtering the export is not exporting the hole filtered list, but only the 100 First. Is this a setting problem too? 

  • hedi replied

    Or is selecting ALL necessary for that?

  • [deleted] replied

    You're welcome, I'm glad it helpedsmile.png

    When exporting the table only what is visible on the page will be exported so you need to show all values you want to have exported. You can increase the number of rows per page in your table settings

    9587264899.png


  • hedi replied

    This causes Problems: When i  click on All then the table is blocking although there aren´t so much data (actually 100 000). This isn´t working. I have to filter a smaller number of data, to click on ALL. 

    Can you check what to do here? 

  •  2,507
    Aleksandar replied

    Hello hedi.

    100k rows of data is not a lot when using Server-side processing that splits the table into pages with 10, 50 or 100 rows, but when you're pulling all that to the page, it is a lot of data, and it takes a lot of time to load. It can also break the table.

    I am not sure if you'll be able to export all filtered rows if they go beyond 100 rows due to this limitation.

    Kind Regards, 

    Aleksandar Vuković
    [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