Redirect after post a question

5.96K viewsIssues
0

Hi everyone. I’m getting this console errors when I hit the submit question button to post a new question. It do post the new question but doesn’t redirect to the index page. And the user can’t realize it. Anyone have an idea? Screenshot:

0

Hi Guys. I was working with a bit complex site an I wasn’t allowed to disable another plugins. So I solved using this javascript code:

window.onload=function() {
document.getElementById(“ask_form”).onsubmit =function() {
window.location.replace(“yoururl.com”);
return false;

}

}

So now I’m redirecting to the anspress index after submit a new question. It works well by now. What do u thing about this solution?

commented on answer

This is not AnsPress issue. Some other plugin is breaking response by outputting dump. It will be better to find the cause of issue rather this using above javascript code. As it will not check if there is any error on form submission. Most easiest way would be download wp-contest folder and search for `var_dump` and `print_r` using a text search software.

You are viewing 1 out of 3 answers, click here to view all answers.