JSON erron when long test is capitalized

JSON erron when long test is capitalized

bexebexe Posts: 6Questions: 2Answers: 0

Hey!
I have some error. When text is like ASDFASDF ADFASDF ASDFAS system works ok, but when is 2 times longer fe.ASDFASDF ADFASDF ASDFAS ASDFASDF ADFASDF ASDFAS page return error:
DataTables warning: table id=zgody - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1

If text is type in lowercase - evrythig works fine.

Any ideas? :smile:

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,147Questions: 26Answers: 4,918

    The place to start is to follow the steps in the link provided in the error:
    https://datatables.net/manual/tech-notes/1

    What is the response you received when you get the Invalid JSON Response error?

    Kevin

  • bexebexe Posts: 6Questions: 2Answers: 0

    Response is empty

  • kthorngrenkthorngren Posts: 21,147Questions: 26Answers: 4,918

    Response is empty

    Then I would start by looking at your server scrip tto see why the response is empty. Is the server generating errors?

    Kevin

  • bexebexe Posts: 6Questions: 2Answers: 0

    I find a problem, this erros is showing up only when in data is polish font like ółżźć...
    But still don't now why :wink:

  • colincolin Posts: 15,237Questions: 1Answers: 2,598
    Answer ✓

    Hi @bexe ,

    It could be a character encoding issue then - check out other threads in the forum along those lines, such as this and this.

    Cheers,

    Colin

  • bexebexe Posts: 6Questions: 2Answers: 0

    The problem is solve :-)

    I use method form https://datatables.net/forums/discussion/21242/invalid-json-response-when-adding-some-utf-8-characters

    **I added this line to the function sql_connect() in spp.class.php before returning the $db object and now it works.

    $db->exec("set names utf8");**

This discussion has been closed.