allan thanks
right now im reading this http://datatables.net/forums/discussion/8551/tabletools-not-working/p1 because i have the same problem. any ideas ?
[quote]
jquery-ColReorder.js Failed to load resource: the server responded with a status of 404 (Not Found)
jquery-KeyTable.js Failed to load resource: the server responded with a status of 404 (Not Found)
jquery-TableTools.js Failed to load resource: the server responded with a status of 404 (Not Found)
jquery-ColVis.js Failed to load resource: the server responded with a status of 404 (Not Found)
jquery-ZeroClipboard.js Failed to load resource: the server responded with a status of 404 (Not Found)
[/quote]
GET jquery.js 304 Not Modified
GET jquery-ui.js 304 Not Modified
GET jquery-tools.js 304 Not Modified
GET jquery-dataTables.js 304 Not Modified
GET jquery-ColReorder.js 304 Not Modified
GET jquery-ColVis.js 304 Not Modified
GET jquery-KeyTable.js 304 Not Modified
GET jquery-TableTools.js 304 Not Modified
GET jquery-ZeroClipboard.js 304 Not Modified
if there is na 404 error for all those .js i wont be able to use them ... but
i can use the rest of the "extras"
only the keytable ... not working
Firstly, can I add my compliments to the mass of praise you've deservedly had for this plug-in. I have used it in many applications, especially in CRUD-style admin applications, and it's excellent.
But now I have this same error: "DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.", but I only have in IE8. I developed and tested using Chrome and Firefox and have only stared checking IE8 now everything works ok. So my app works fine in Chrome, Safari and Firefox but not in IE8. The JSON goes through lint without any error.
How do I debug this, given that I can't reproduce the error in Firefox?
Thanks Allan. There's security on this app at the moment but I have made a copy so you can look at it. I have sent you the URL by PM rather than put it here.
I thought I'd solved it last night when I noticed that IE9 wasn't accepting the JSON as JSON and was putting up a 'Save As' box instead. I solved this by changing the headers from:
Help?! Having the same problem on my Cart66 Professional. "DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error."
I don't know what I'm doing, so basic level instructions would be really helpful. I've submitted a support ticket but there seems to be no help. The problem is prevent cart66 from working. When we click on the button to add to cart it says "readyState:4 Status: 200" Thank you!
Where have you submitted a ticket? I don't have a record of anything.
I also don't actually see how to reproduce the error. I click the add to cart button and get he readyState alert, but nothing about JSON formatting error.
Needless to say, the JSON formatter error is exactly what it says on the tin - invalid JSON.
Just for your information: Few hours ago I just upgrade to php 5.5 from php 5.4.6: DataTables not working anymore... Got the same error message "DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.".
This message out only for the ServerSide example (I mean mySQL queries with "server_processing.php")...
So, I do believe there is a bug somewhere as "the stuff was working before the upgrade".
MacOS 10.8.3, Apache/2.2.22 (Unix) PHP/5.5.0 mod_jk/1.2.37 DAV/2 mod_ssl/2.2.22 OpenSSL/0.9.8x mod_perl/2.0.5 Perl/v5.12.4 - Server type: MySQL
Server version: 5.5.28 - MySQL Community Server (GPL)
edit: The tables used are installed from the "data.sql" file coming with the package...
edit(2): same problem with FireFox on the same machine...
That's the Javascript error. What is the error coming back from the server in the Ajax request. Please use the DataTables debugger or give us a link and we might be able to help more.
Sorry Allan: I have to write a few lines of php code to achieve your request. As for a link, I have only one machine running php 5.5. It may come out from this story I took a very bad decision to upgrade from php 5.4.6... Thanks for your help and the good work. p.s. I just completed the necessary #bash routines to easily switch back and forth between php versions... (not so easy in fact).
Allan: after a complete rewrite of the script server_processing.php I got the right results. The error was mainly due to a mysql_pconnect command which no longer exist in php version 5.5.0 and above, to be replaced by "mysqli_connect" (procedural style) or "mysqli::select_db" (object oriented style).
So, as far as I'm concerned, the discussion is closed.
Thank you again for the good work.
d.
p.s. I use the code to display huge "geoip" related data stored in MySQL databases...
Ah okay. I think I need to get around to writing the server_processing.php change that I've been thinking needs to be done! Thanks for the feedback and good to hear it is now working for you.
Hi Allan, I am getting the same error message "DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error." as mentioned above. I've taken the $output and run it through JSONLint and it checks out as valid JSON. So now I don't know what to do to solve the problem. I've also looked at it through the DataTables debugger, but nothing jumped out at me as a clue. I am using the example script for Server-side processing | PHP with MSSQL ODBC driver. I am connecting to a SQL ServerExpress 2008 database. Using jQuery version 1.7.2. The script should work, yet I get this error. What should I look for to correct the problem?
Hi Allan,
I've continued to try to figure out why the "...could not be parsed" error appears even though the aaData is validated. I've cleaned up some of the datatable definitions. But nothing helps. Have you seen anything that doesn't look right? Any suggestions yet?
Here is an updated debug trace page: http://debug.datatables.net/oduzaq
Here is the web page: http://173.248.176.202/sqlrawdatatables.php
Here is the call to the database: http://173.248.176.202/includes/content/datatables_sqldata-odbc.php
Any light that you can shed on this is appreciated.
Robert
{"sEcho":1,"iTotalRecords":20,"iTotalDisplayRecords":20,"aaData":[[999,"Amelti Testing","Roger","Kronborg","Norway"],[1001,"Oppland Metall",null,null,"Norway"],[1002,"Transportpartner",null,null,null],[1003,"Gran Taralrud",null,null,null],[1005,"Toten Transport",null,null,"Norway"],[1006,"Eesti Energia","Urmas","Voit, Jr","Estonia"],[1007,"Friendly Food Qatar",null,null,"Qatar"],[1008,"Odeh Naber & Sons Transport Co",null,null,"Jordan"],[1009,"Modern Energy","John","Stevens","Canada"],[1010,"TS T\u00f8nsberg",null,null,"Norway"]]}
[/code]
The title tag at the top is making the return invalid JSON. I'm not sure what will be adding that to the output, but there is something in your script which is doing so. Removing that will resolve the invalid JSON warning since it will be valid JSON thereafter :-)
Replies
right now im reading this http://datatables.net/forums/discussion/8551/tabletools-not-working/p1 because i have the same problem. any ideas ?
[quote]
jquery-ColReorder.js Failed to load resource: the server responded with a status of 404 (Not Found)
jquery-KeyTable.js Failed to load resource: the server responded with a status of 404 (Not Found)
jquery-TableTools.js Failed to load resource: the server responded with a status of 404 (Not Found)
jquery-ColVis.js Failed to load resource: the server responded with a status of 404 (Not Found)
jquery-ZeroClipboard.js Failed to load resource: the server responded with a status of 404 (Not Found)
[/quote]
GET jquery-ui.js 304 Not Modified
GET jquery-tools.js 304 Not Modified
GET jquery-dataTables.js 304 Not Modified
GET jquery-ColReorder.js 304 Not Modified
GET jquery-ColVis.js 304 Not Modified
GET jquery-KeyTable.js 304 Not Modified
GET jquery-TableTools.js 304 Not Modified
GET jquery-ZeroClipboard.js 304 Not Modified
if there is na 404 error for all those .js i wont be able to use them ... but
i can use the rest of the "extras"
only the keytable ... not working
Firstly, can I add my compliments to the mass of praise you've deservedly had for this plug-in. I have used it in many applications, especially in CRUD-style admin applications, and it's excellent.
But now I have this same error: "DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error.", but I only have in IE8. I developed and tested using Chrome and Firefox and have only stared checking IE8 now everything works ok. So my app works fine in Chrome, Safari and Firefox but not in IE8. The JSON goes through lint without any error.
How do I debug this, given that I can't reproduce the error in Firefox?
If you could give us a link, that would be helpful.
Allan
I thought I'd solved it last night when I noticed that IE9 wasn't accepting the JSON as JSON and was putting up a 'Save As' box instead. I solved this by changing the headers from:
header('Content-type: application/json');
to:
header('Content-Type: text/plain');
header('X-Content-Type-Options: nosniff');
That kept IE8 happy but didn't stop it working in Firefox or Chrome.
However, still the same error.
I don't know what I'm doing, so basic level instructions would be really helpful. I've submitted a support ticket but there seems to be no help. The problem is prevent cart66 from working. When we click on the button to add to cart it says "readyState:4 Status: 200" Thank you!
http://the-human-solution.org/take-action/membership/
I also don't actually see how to reproduce the error. I click the add to cart button and get he readyState alert, but nothing about JSON formatting error.
Needless to say, the JSON formatter error is exactly what it says on the tin - invalid JSON.
Allan
Jane
This message out only for the ServerSide example (I mean mySQL queries with "server_processing.php")...
So, I do believe there is a bug somewhere as "the stuff was working before the upgrade".
MacOS 10.8.3, Apache/2.2.22 (Unix) PHP/5.5.0 mod_jk/1.2.37 DAV/2 mod_ssl/2.2.22 OpenSSL/0.9.8x mod_perl/2.0.5 Perl/v5.12.4 - Server type: MySQL
Server version: 5.5.28 - MySQL Community Server (GPL)
edit: The tables used are installed from the "data.sql" file coming with the package...
edit(2): same problem with FireFox on the same machine...
Allan
Allan
So, as far as I'm concerned, the discussion is closed.
Thank you again for the good work.
d.
p.s. I use the code to display huge "geoip" related data stored in MySQL databases...
Regards,
Allan
Allan
I've continued to try to figure out why the "...could not be parsed" error appears even though the aaData is validated. I've cleaned up some of the datatable definitions. But nothing helps. Have you seen anything that doesn't look right? Any suggestions yet?
Here is an updated debug trace page: http://debug.datatables.net/oduzaq
Here is the web page: http://173.248.176.202/sqlrawdatatables.php
Here is the call to the database: http://173.248.176.202/includes/content/datatables_sqldata-odbc.php
Any light that you can shed on this is appreciated.
Robert
Here is the link to the debug trace: http://debug.datatables.net/alotoj
Thanks, Robert
Thanks, Robert
This is what is being returned from the server:
[code]
< title > Datatables - SQLData < /title>
{"sEcho":1,"iTotalRecords":20,"iTotalDisplayRecords":20,"aaData":[[999,"Amelti Testing","Roger","Kronborg","Norway"],[1001,"Oppland Metall",null,null,"Norway"],[1002,"Transportpartner",null,null,null],[1003,"Gran Taralrud",null,null,null],[1005,"Toten Transport",null,null,"Norway"],[1006,"Eesti Energia","Urmas","Voit, Jr","Estonia"],[1007,"Friendly Food Qatar",null,null,"Qatar"],[1008,"Odeh Naber & Sons Transport Co",null,null,"Jordan"],[1009,"Modern Energy","John","Stevens","Canada"],[1010,"TS T\u00f8nsberg",null,null,"Norway"]]}
[/code]
The title tag at the top is making the return invalid JSON. I'm not sure what will be adding that to the output, but there is something in your script which is doing so. Removing that will resolve the invalid JSON warning since it will be valid JSON thereafter :-)
Regards,
Allan
Robert