Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic.
Hi,
When I’m trying to log in with a wrong password, I get the following error:
Error in JQuery.ajax when submitting a form: SyntaxError: Unexpected token <
This happens only when I’m filling in a wrong password. When the right password is entered, I get logged in.
How can I solve this?
Yes, which theme are you using? It was a problem at my theme (Avada)
Ok,
Please do the following:
open functions.php
in the Avada theme folder.
Search for this line: add_action( 'init', 'avada_load_login_redirect_support' );
and comment it like this:
// add_action( 'init', 'avada_load_login_redirect_support' );
Then it should work.
The problem was that Avada placed an redirect when a login fails, and return an HTML page. the Ajax Request expects an JSON response but gets an HTML and tries to parse it. And then gives the error.
You are welcome! Glad I could help. I was struggling with that issue too 😛
Good luck with the development of your site.
You must be logged in to reply to this topic.