?
avatar PhilETaylor
PhilETaylor
2 Oct 2020

Steps to reproduce the issue

Another Ajax bug on admin login

Load the /administrator/ page.

Edit /administrator/index.php and place a die(); after the opening <?php - doing this replicates "bug" on your site, it could be a php warning, or an exception in a plugin, or any PHP error. Most common is a plugin outputting PHP Notices or warnings...

Try to login

Note that you get ZERO FEEDBACK now, no error messages are shown. You try to click Login In again and no feedback... you are now at a loss as why you cannot login.

This is because the JSON response to the AJAX request is malformed and Joomla's JS doesn't handle it with a try/catch block

Expected result

Visual "there was a problem" kind of message... JLIB_JS_AJAX_ERROR_OTHER even :)

Actual result

No feedback - except a console.log error message

SyntaxError: JSON Parse error: Unexpected EOF

Screenshot 2020-10-03 at 00 06 12

You can change the die() statment - lets output some text, make your /administrator/index.php be this now <?php arghhhh and you will now get the more common error:

SyntaxError: JSON Parse error: Unrecognized token '<'

Screenshot 2020-10-03 at 00 08 46

Additional Information

There was a PR for [4.0] Remove AJAX for login #29571 ... which would make this issue null and void by removing ajax

avatar PhilETaylor PhilETaylor - open - 2 Oct 2020
avatar joomla-cms-bot joomla-cms-bot - change - 2 Oct 2020
Labels Added: ?
avatar joomla-cms-bot joomla-cms-bot - labeled - 2 Oct 2020
avatar PhilETaylor PhilETaylor - change - 2 Oct 2020
The description was changed
avatar PhilETaylor PhilETaylor - edited - 2 Oct 2020
avatar PhilETaylor PhilETaylor - change - 2 Oct 2020
The description was changed
avatar PhilETaylor PhilETaylor - edited - 2 Oct 2020
avatar PhilETaylor PhilETaylor - change - 2 Oct 2020
The description was changed
avatar PhilETaylor PhilETaylor - edited - 2 Oct 2020
avatar PhilETaylor PhilETaylor - change - 2 Oct 2020
The description was changed
avatar PhilETaylor PhilETaylor - edited - 2 Oct 2020
avatar PhilETaylor
PhilETaylor - comment - 2 Oct 2020

This is almost a duplicate of #27786 - we came to the same conclusion - proof that this issue has already causing " I spent two days trying to figure out what happened" type moments :)

avatar Fedik
Fedik - comment - 8 Oct 2020

please check #30992

avatar alikon alikon - close - 8 Oct 2020
avatar alikon
alikon - comment - 8 Oct 2020

pleaset test #30992

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

Add a Comment

Login with GitHub to post a comment