DataTables warning: table id=table_name - Invalid JSON response.
DataTables warning: table id=table_name - Invalid JSON response.
Hi all,
since one week I get the following error message in one page what I never changed:
DataTables warning: table id=table_name - Invalid JSON response.
I checked all files and all forum but I don´t find why this error appears.
Today I look at the page resources and I saw that the following error appears in the file table.bookings_dm.php
<br />
<b>Fatal error</b>: Uncaught Error: Call to undefined function number() in /php/Editor/Field.php:593
Stack trace:0 /php/Editor/Editor.php(803): DataTables\Editor\Field->optionsExec(Object(DataTables\Database))
1 /php/Editor/Editor.php(555): DataTables\Editor->_get(NULL, Array)
2 /table.bookings_dm.php(120): DataTables\Editor->process(Array)
3 {main}
thrown in <b>/php/Editor/Field.php</b> on line <b>593</b><br />
Can someone help me please? Show me a way because I really have not changed anything in the files.
Best
Replies
Could you show me the code in your
table.bookings_dm.php
file please? It looks like that was created with Generator - is that the case?Thanks,
Allan
Please Download the corresponding files from this link:
ertan-atay.com/folder.zip
After your download can you please give me a notice? Then I can delete the download file.
Thanks
Thanks - I've got the file now.
The line I have in Field.php, line 593 is:
Does that match in the Editor libraries you are using? What version are you using?
The one thing that looks odd to me in the code is the
options()
list for thebookings.internal_id
field.Its being called twice, with a different number of parameters (looks like column names)? The documentation here shows how the
options()
method can be used.Regards,
Allan
Hi Allan,
In the /php/Editor/Editor.php file is the following version
and in the /php/Editor/File.php the line 593 is not matching.
For me, the following is in it:
I deleted the following line table.bookings_dm.php and it works again
The funny thing is that I did not change anything in this file and it did not work anymore.
It works again after deleting the line.
But I am very happy and thank you very much for your support.
Best regards
1.6.0 is fairly old now - it might be worth updating to 1.7.0 which has a number of improvements. However, good to hear you've got it working now.
Allan
If I have not made any changes to the files can I just upload the following files:
https://editor.datatables.net/download/download?type=php
Do I have to update something else?
Yes - you should be able to just replace them like for like.
Allan