Server-side processing invalid json

Server-side processing invalid json

victorkurauchivictorkurauchi Posts: 12Questions: 1Answers: 0

Hi everyone.

I'm running datatables server-side script (php), just like in the tutorial http://datatables.net/examples/data_sources/server_side.html

But it's not working yet...

I already checked my script searching for errors.
- PDO Connection Ok
- Trying to see the json returned, i can get the 'recordsTotal' parameter and its value, but not the 'data' parameters (always empty).
- Datatables debug: http://debug.datatables.net/asabuf

May you guys find some error to help me here with the script ?
Thanks a lot.

Answers

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin

    There is no reply from the server, which is not valid JSON, hence the error message. I would suggest checking your server's error logs.

    Allan

  • victorkurauchivictorkurauchi Posts: 12Questions: 1Answers: 0

    Thanks for the reply Allan, i think i just found.

    Some results returned from server-side has non-utf8 chars, so breaks the JSON.

    Example: '[6] => Papa Jo�o Paulo I'

    This register breaks json, right ?
    I'm looking for some solution to it. Do you know some workaround for special chars/non utf-8 returned from server?

    Thanks !

  • victorkurauchivictorkurauchi Posts: 12Questions: 1Answers: 0
    edited May 2014

    Ok, i fixed non-utf8 characters.

    Now i just would like to know: Is it possible to add a new column called 'Options', with some actions like (edit/delete) ?

    Thanks Allan!

This discussion has been closed.