?
avatar ceford
ceford
3 Feb 2020

Steps to reproduce the issue

In the admin global configuration set the wrong cookie path - I mistyped and did not notice.
Logout and try to login.

Actual result

The login form does nothing. I spent two days trying to figure out what happened.

System information (as much as possible)

This is mostly not relevant to this issue.
Joomla 4.0-beta1-dev nightly build from 2020/02/01 PHP7.4 Apache 2.4 on Macbook Pro

Additional comments

I found that the Ajax call to check credentials was returning the html for the form and not the json success or fail message. So the script died. It would be nice to wrap the var response = JSON.parse(xhr); line in a try/catch block and issue some sort of warning in the catch block.

Votes

# of Users Experiencing Issue
1/1
Average Importance Score
3.00

avatar ceford ceford - open - 3 Feb 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 3 Feb 2020
avatar SharkyKZ
SharkyKZ - comment - 13 May 2020

Do we even need AJAX for login? I don't see much use for it.

The user is logged in regardless of response, so what would be the expected behavior? Do we just refresh the page to continue? This option isn't good because if credentials are invalid, the user remains at login screen and no message is shown. And if we only show a message, this is not good either because the user is actually logged in (if credentials are correct).

avatar Fedik
Fedik - comment - 13 May 2020

This somehow an old issue, not really about a login only.
More about that Joomla! return HTML response for JSON request, when error happen

avatar SharkyKZ
SharkyKZ - comment - 11 Jun 2020

It does return correct JSON error response in most cases. But even PHP notices can malform the response.

avatar Fedik
Fedik - comment - 8 Oct 2020

please check #30992

avatar alikon alikon - change - 8 Oct 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-10-08 12:02:27
Closed_By alikon
avatar alikon alikon - close - 8 Oct 2020
avatar alikon
alikon - comment - 8 Oct 2020

please test #30992

Add a Comment

Login with GitHub to post a comment