Errors When Reordering / searching / length
Errors When Reordering / searching / length
Link to test case: N/A
Debugger code (debug.datatables.net): https://debug.datatables.net/aguneh
Error messages shown: DataTables warning: table id=datatable - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1
Description of problem: Intermittent errors when trying to reorder, search or set length. I updated everything but the debugger says rowReorder 1.2.7 is still on 1.2.6
The page is in an admin section so no way to send you there unfortunately but I'm using serverSide with the PHP script from this website with the complex function. Everywhere else on my site it is working fine. I can't see any errors in the code and the table is a very simple info table, nothing special about it at all.
Thanks in advance.
This question has an accepted answers - jump to answer
Answers
The place to start troubleshooting is to use the steps provided at the link in the error:
http://datatables.net/tn/1
Let us know what you find.
Kevin
I've been down this road so many times now, always some erroneous error, this one has me stumped, nothing in console, no obvious code issues, here take a look.
The Datatable:
**The PHP Controller: **
Complex is the same complex as found in the SSP here on the website https://datatables.net/download/packages
How does dataTables deal with special characters, for example: parentheses, single and double quotes etc, do I need to escape them before they reach the Table?
I'm thinking that is the error I'm getting
What did you find, using the browser's network inspector, as a response when you get the Invalid JSON response error?
You shouldn't need to do anything with them. The Invalid JSON response error is before Datatables tries to populate the table.
Kevin
I found that a single quote in a string was preventing the table from loading, either that or this (string), I deleted the whole string from the DB and all works fine now.