i am facing issue where it return a server 500 error sometimes when i submit an answer.
Error message : "Unexpected response from server - please try again or switch off Javascript."
Looks like something seems to be interfering or misaligning the response text. which then is resulting in the error.
The answer is going through the database. However it returns with an error. Subsequent page refresh is showing up the answer i submit earlier.
Tried the following and feel like giving up.
1. Chrome network capturing. all this says is server encountered an error.
2. My apache and php logs are all enabled including display errors =on, changing log level and error is not captured in the logs anywhere to diagnose.
Are there anyways to find out whats happening ?
One thing i can think of is to locate where in the backend are we preparing the "lines" output to be sent to the browser. and then compare it with a working response and a failing resposne to find out differences. Does anyone know where are we generating this "lines" array in the backend.
qa_ajax_post('click_c', params,
function (lines) {
or are there anyother better ways ? All i want to see is the error and the reason why this is happening.
Other Info: Whenever this happens, the post is going through but not adding a record in eventlog table. All other attempts is successfully adding records in event log as well as adding an answer.
UPDATE : Looks like the issue is around event logging. Tried commenting out event reporting line in post-create.php. This resulted in hiding the error. However, i need to find out the cause on why event logger isnt working in few scenarios and need to fix it as soon as possible. Anyways to find out what the error Mysql is returning at the database level or something?