Issman Posted July 17, 2023 Share Posted July 17, 2023 (edited) 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: Copied the files from Prod to the Staging subdomain Exported the prod DB into the staging DB Changed different DB values (Store Url, Disabled Caching, Disabled the cookie check for the Admin, disabled URL rewrites) Deleted the cache folders in the PS filesystem 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! Edited July 17, 2023 by Issman More precise title (see edit history) Link to comment Share on other sites More sharing options...
wepresta Posted July 17, 2023 Share Posted July 17, 2023 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. 2 Link to comment Share on other sites More sharing options...
Issman Posted July 18, 2023 Author Share Posted July 18, 2023 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. Thanks! Link to comment Share on other sites More sharing options...
wepresta Posted July 18, 2023 Share Posted July 18, 2023 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. Thanks! Have you recently performed a database import? 1 Link to comment Share on other sites More sharing options...
Issman Posted July 19, 2023 Author Share Posted July 19, 2023 (edited) I absolutely have performed a DB import 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 July 19, 2023 by Issman (see edit history) Link to comment Share on other sites More sharing options...
wepresta Posted July 19, 2023 Share Posted July 19, 2023 52 minutes ago, Issman said: I absolutely have performed a DB import 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. 1 Link to comment Share on other sites More sharing options...
Issman Posted July 19, 2023 Author Share Posted July 19, 2023 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 More sharing options...
lmnxtlvl Posted September 12 Share Posted September 12 (edited) did you manage to fix the issue? Edit: If onyone is wondering. I had this issue on my local development evoirment. The fix was to set the 'PS_COOKIE_SAMESITE' value to 'Lax' in the database 'ps_configuration' table. Edited September 16 by lmnxtlvl (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now