Jump to content

PS 1.7.8.4 - Admin logon redirects to admin logon page with a 302 redirect


Issman

Recommended Posts

Hi all,

I am struggling to resolve an issue I am having with PS 1.7.8.4.

I have a prod environment where everything is working as expected.  In order to prepare my planned upgrade in Prod, I wanted to set up a staging environment.

Here are the steps I followed:

  1. Copied the files from Prod to the Staging subdomain
  2. Exported the prod DB into the staging DB
  3. Changed different DB values (Store Url, Disabled Caching, Disabled the cookie check for the Admin, disabled URL rewrites)
  4. Deleted the cache folders in the PS filesystem
  5. Put a default .htaccess (like with the bare minimum)

The staging fronted works fine.

While the staging admin login just keeps me in a loop.  When entering the correct credentials, a 302 redirect gets me back to the same logon page.  GIF attached for the example

Web server details:

  • LiteSpeed
  • DNS via Cloudflare
  • PHP version:7.4.33

I tried disabling Cloudflare cache and DNS as well > no result.

Any help would be appreciated.

Thanks!

 

87e2dd31-5c0a-4de0-8fc3-ea3ef0269e86.gif

Edited by Issman
More precise title (see edit history)
Link to comment
Share on other sites

  • Issman changed the title to PS 1.7.8.4 - Admin logon redirects to admin logon page with a 302 redirect

Hello,

I require further information. Could you please enable debug mode via the database in ps_configuration and then open the Chrome console ? Navigate to the "Network" tab and click on FETCH/XHR. Afterwards, try logging in, and you should see an additional error message highlighted in red within the console.

  • Like 2
Link to comment
Share on other sites

22 hours ago, wepresta said:

Hello,

I require further information. Could you please enable debug mode via the database in ps_configuration and then open the Chrome console ? Navigate to the "Network" tab and click on FETCH/XHR. Afterwards, try logging in, and you should see an additional error message highlighted in red within the console.

Hi, 

Thanks for looking into this issue. 

I have enabled the Debug mode with this change in the defines.inc.php config file.  Apparently, you cannot do it from the DB directly in PS 1.7.x

if (!defined('_PS_MODE_DEV_')) {
define('_PS_MODE_DEV_', true);
}

However, I did capture a trace using the DevTools and there is no sign of an error in the console.  The network trace starts with a 302 HTTP redirect immediately and all the rest is successful (200 HTTP).
The only thing I notice is the token change in the URL params but I am not sure whether this is expected.

NeHgkTnivq.png.d9849ebcd4742bb8cacf63a00a942604.png
Thanks!

Link to comment
Share on other sites

2 hours ago, Issman said:

Hi, 

Thanks for looking into this issue. 

I have enabled the Debug mode with this change in the defines.inc.php config file.  Apparently, you cannot do it from the DB directly in PS 1.7.x

if (!defined('_PS_MODE_DEV_')) {
define('_PS_MODE_DEV_', true);
}

However, I did capture a trace using the DevTools and there is no sign of an error in the console.  The network trace starts with a 302 HTTP redirect immediately and all the rest is successful (200 HTTP).
The only thing I notice is the token change in the URL params but I am not sure whether this is expected.

NeHgkTnivq.png.d9849ebcd4742bb8cacf63a00a942604.png
Thanks!

 

Have you recently performed a database import?

  • Like 1
Link to comment
Share on other sites

I absolutely have performed a DB import :lol:

Actually, the environment I am trying to access is a Staging env I have recently created out of the Prod env.  So I did backup the Prod DB in order to import in in this Staging env.  
I did the same with the PS files.

Is there a step I missed in this import?

Thanks!

Edited by Issman (see edit history)
Link to comment
Share on other sites

52 minutes ago, Issman said:

I absolutely have performed a DB import :lol:

Actually, the environment I am trying to access is a Staging env I have recently created out of the Prod env.  So I did backup the Prod DB in order to import in in this Staging env.  
I did the same with the PS files.

Is there a step I missed in this import?

Thanks!

I suggest re-importing the database properly first and checking if it fixes the issue. Also, don't forget to change the ps_shop_url values.

  • Like 1
Link to comment
Share on other sites

4 hours ago, wepresta said:

I suggest re-importing the database properly first and checking if it fixes the issue. Also, don't forget to change the ps_shop_url values.

Thanks for the suggestion, I will try a re-import. 

What do you suggest to properly import the database?  Export from PHPMyAdmin and then import?  Any specific step that should be followed?

Thanks!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...