Error on Site "DataTables Editor - date inputs example "

Error on Site "DataTables Editor - date inputs example "

kissinger99kissinger99 Posts: 5Questions: 0Answers: 0
edited September 2012 in Editor
Hallo!

If I open the Example-Site "DataTables Editor - date inputs example" on my Server, I get this error-message:

"DataTables warning (table id = 'example'): DataTables warning: JSON data from server could not be parsed. This is caused by a JSON formatting error."

And the table is without data.

What is wrong?

Thank you!

Replies

  • allanallan Posts: 61,439Questions: 1Answers: 10,053 Site admin
    My guess is that your server is reporting an error. What is in the Ajax request's return? (looking Firebug or Inspector). Have you followed these instructions: http://editor.datatables.net/tutorials/installing ?

    Allan
  • kissinger99kissinger99 Posts: 5Questions: 0Answers: 0
    Hallo!

    I have followed the instructions.

    See here my test-site: http://cheap-house.de/datatable/extras/Editor/examples/dates.html

    What I must do?

    Thank you!
  • allanallan Posts: 61,439Questions: 1Answers: 10,053 Site admin
    Did you look at the XHR return?

    [code]


    Warning: date_create_from_format() [function.date-create-from-format]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'Europe/Berlin' for 'CEST/2.0/DST' instead in /var/www/web207/html/cheap-house/datatable/extras/Editor/examples/php/lib/Editor/Format.php on line 63



    [/code]

    You need to fix that issue with your PHP configuration.

    Allan
  • kissinger99kissinger99 Posts: 5Questions: 0Answers: 0
    Tnank you!
  • EotSEotS Posts: 9Questions: 1Answers: 0
    I've got the same issue after trying to move my project out to the web server (was running fine on localhost) and I don't know what I need to do to "fix" the PHP configuration.

    Kissinger99, can you give me some idea how you resolved it?
  • allanallan Posts: 61,439Questions: 1Answers: 10,053 Site admin
    Use `phpinfo()` to find out what php.ini file your PHP is loading content from. Then edit that file to add a `date.timezone` parameter, set to the correct location, as the error suggests. You might find this useful: http://php.net/manual/en/timezones.php

    Allan
This discussion has been closed.