?
avatar ceford
ceford
1 Feb 2020

Steps to reproduce the issue

Obtain nightly build as of 2020-02-01 install and login as admin.

Expected result

All seems fine. But...

Actual result

Logout and login fails - looks like a username / password issue.

Try a different browser - login works once and then fails.

System information (as much as possible)

Local development on Mac with PHP 7.4

Additional comments

Javascript debugger says this:

VM72:1 Uncaught SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse ()
at onSuccess (admin-login.min.js?d92cf627a53d81ada8418659da7cbd62:1)
at XMLHttpRequest.c.onreadystatechange (core.min.js?d92cf627a53d81ada8418659da7cbd62:1)
onSuccess @ admin-login.min.js?d92cf627a53d81ada8418659da7cbd62:1
c.onreadystatechange @ core.min.js?d92cf627a53d81ada8418659da7cbd62:1
XMLHttpRequest.send (async)
a.request @ core.min.js?d92cf627a53d81ada8418659da7cbd62:1
(anonymous) @ admin-login.min.js?d92cf627a53d81ada8418659da7cbd62:1
a.submitform @ core.min.js?d92cf627a53d81ada8418659da7cbd62:1
a.submitbutton @ core.min.js?d92cf627a53d81ada8418659da7cbd62:1
(anonymous) @ admin-login.min.js?d92cf627a53d81ada8418659da7cbd62:1

avatar ceford ceford - open - 1 Feb 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 1 Feb 2020
avatar astridx
astridx - comment - 1 Feb 2020

I just copied the nightly build here. I cannot confirm your problems. My system information on my test computer is

dbserver: mysql
dbversion: 5.7.29-0ubuntu0.18.04.1
dbcollation: utf8_general_ci
dbconnectioncollation: utf8mb4_general_ci
dbconnectionencryption:
dbconnencryptsupported: true
phpversion: 7.2.24-0ubuntu0.18.04.2
server: Apache/2.4.29 (Ubuntu)
sapi_name: apache2handler
version: Joomla! 4.0.0-beta1-dev Development [ MaƱana ] 17-October-2019 20:21 GMT
useragent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:72.0) Gecko/20100101 Firefox/72.0

avatar SharkyKZ
SharkyKZ - comment - 1 Feb 2020

Please check PHP error logs. A simple notice could cause this. To proceed to administrator area you can just refresh the page.

avatar ghazal
ghazal - comment - 1 Feb 2020

@astridx
Pls check that @ceford is using PHP 7.4. You are using PHP 7.2.24.

I have had problems with J4 admin login on all regular local servers for mac (MAMP, Bitnami MAMP, XAMPP), updated to PHP 7.4.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27752.
avatar ceford
ceford - comment - 1 Feb 2020

I created a new install from the same download that gave me the problems. It is working fine. Right now I have an early J4beta-dev and my latest one that work fine and two from yesterday that are both broken. I spent hours with the debugger trying to figure out went wrong. All I established was that the form token was not valid and the Javascript return was the form html rather than a json success or fail message. It is nothing to do with the PHP version. However I do have php Display Errors set to on. There is nothing in the php error log. It may be something to do with Sessions. Or my cat walked over my keyboard.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27752.

avatar ghazal
ghazal - comment - 2 Feb 2020

@ceford
Would you be kind enough to tell me :
Which local server do you use, mac's? MAMP? Other ?
Which macOS version ?

avatar ceford
ceford - comment - 3 Feb 2020

With a flash of inspiration I solved this problem in a couple of minutes, that after spending two days from dawn til midnight stepping through the code with the debugger to try to find out what was going on, without success. This is the story:

I often run more than one local Joomla website for development purposes so I need to set the cookie path. So I did a new install of the latest nightly build, logged in and set my usual site setup; did a few other things and then logged out. I hit the problem when I tried to log in again. It turned out I had put the cookie path in both the cookie domain field and the cookie path field. When I did the second install I used the wrong cookie path - I just got mixed up because of all these sites I was working on. So fixing the configurationfile with an editor allowed admin login again in both cases.

I think there is a lesson here. I am an experienced idiot. Imagine the problem a novice idiot would face, especially with a production site full of content. Maybe the default cookie path should be the site path and the default cookie domain the site domain. Maybe these fields should be checked.

Is there a place where we can record 'How to fix things that can go wrong'? Should I close this issue or add this solution to it first?

I think this issue can be closed and I will open a new one (or two) about checking the admin global configuration and checking the ajax login return is in one of the two valid json responses.

avatar ceford
ceford - comment - 3 Feb 2020

I have created two separate more specific Tracker Items so this one can be closed. I don't see how to do that myself.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/27752.

avatar Quy
Quy - comment - 3 Feb 2020
avatar Quy Quy - close - 3 Feb 2020
avatar Quy Quy - change - 3 Feb 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-02-03 11:35:41
Closed_By Quy
avatar Quy
Quy - comment - 3 Feb 2020

@ceford See screenshot at github where you can make a comment or close issue.

close

Add a Comment

Login with GitHub to post a comment