Help Warning: Invalid JSON response

Help Warning: Invalid JSON response

yurispyyurispy Posts: 29Questions: 6Answers: 0

Good morning,
I just transferred all my site to a secondary server.
All seem to work except some page that uses datable.
I have this error "DataTables warning: table id=phyto_test - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1"

Except when I go to see ajax's answer. It's empty. No mistakes and especially no answers. NOTHING. Status 200 Type xhr and response empty.
I transferred all the db and file, I have the same access to sql.
I use datable elsewhere on the site and it works
This party has some differences that I use datable Editor.

Replies

  • kthorngrenkthorngren Posts: 20,147Questions: 26Answers: 4,736

    The response is coming from the server. I would suggest reviewing logs and debug info on the server to see why its returning an empty data set.

    Kevin

  • yurispyyurispy Posts: 29Questions: 6Answers: 0

    I thought about it but the 2 apaches log files are empty at the time I do the tests.

  • allanallan Posts: 61,451Questions: 1Answers: 10,055 Site admin

    Can you use the debugger to give me a trace please - click the Upload button and then let me know what the debug code is.

    Allan

  • yurispyyurispy Posts: 29Questions: 6Answers: 0

    Thanks Allan I'll try that.
    Could it be that it comes from mariadb's transition to mysql or a utf8 problem wrongly set?

  • yurispyyurispy Posts: 29Questions: 6Answers: 0

    Well I found it, it came from the config.php file
    ""dsn" =>"" // PHP DSN extra information. Set as charset=utf8 if you are using MySQL"

    I didn't think looked since the sql connection settings I put the same on both servers except that one runs under mariadb and the other mysql.

    I also forced php.ini my.ini everywhere in utf8 because I have character problems now with lines that display but empty.

    Thank you.

    Translated with www.DeepL.com/Translator

  • allanallan Posts: 61,451Questions: 1Answers: 10,055 Site admin

    Good to hear you've got it working now :).

    Allan

  • kleeh9091kleeh9091 Posts: 3Questions: 0Answers: 0

    @kthorngren .. BS , it's NOT coming from the server -- at least not from mine. It's coming from the datatables libs that we use.

  • kthorngrenkthorngren Posts: 20,147Questions: 26Answers: 4,736
    edited December 2019

    @kleeh9091 I'm confused with your response. Maybe you can provide more information of the problem. Instead of BS maybe you should start a new thread with your questions and config. Obviously from your posts in other threads you have a different configuration than those threads.

    Kevin

  • allanallan Posts: 61,451Questions: 1Answers: 10,055 Site admin

    @kleeh9091 - As shown by the fact that Kevin helped to resolve the original question - his replies above were spot on. Kevin is a hugely valued member of the community and has helped thousands of people to resolve issues. Please consider your responses more carefully in future, as I'm sure you would not like to be addressed this way yourself.

    In order to be able to provide help we need more information about the problem you are facing - the forum rules state that a test can is required so we have the information we need in order to be able to help resolve issues (otherwise we are just guessing and that isn't going to help anyone!).

    I'm closing this thread for now since its from July 2018 and there is no extra information here. Please open a new thread with a link to a test case showing the issue so we can actually offer some help.

    Allan

This discussion has been closed.