Jump to content

Problem with Prestashop Login after moving


Juri_gentili

Recommended Posts

Hello,

 

I just copied my instance of Prestashop from one domain to another, to make some tests.

 

I manually copied the site directory and the db(using phpmyadmin). I left the tables for statistics, indicated in the backoffice in the "DB Backup" section.

 

Imported the db via phpmyadmin.

 

I modified the PS_DOMAIN fields in the ps_configuration table, changed the site url in ps_shop_url, and modified the settings.inc.php file with the new DB data.

 

I managed to make the site show and "work", but now i have a problem with logins in site and in backoffice.

 

In the site i can login with a test customer account and password, I get redirected to main page, but my customer account doesn't remain logged in after this, i can do the login. No error message, the data is correct.

 

In backoffice I put mail and password, they both correct, I got a page reload but then it shows again the login form with just "&redirect=AdminDashboard" added in the url. No error message, the data is correct.

 

I checked the forum and tried the solutions in it, but it doesn't seem to work. I tried to test the logins in Mozilla, Chrome and Safari.

 

Prestashop version "1.6.1.3".

 

Please help me.

 

Thanks in advance.

 

 

SOLUTION/ERROR FOUND:

it was the field "domain" in the cookie.php file, it was hardcoded into the wrong url. Corrected it to the new url and all works again.

Can someone please change this topic to solved? 

Thank you.

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

Hello ndiaga,

 

thank you for replying.

 

I tried to clear cache in the browser, even accessing in incognito mode from the browser, but it does not work.

 

I created a new user and it was registered but when i try to login it's the same situation.

 

By checking some code I found out that the login process does not set up the context->employee / context->customer, but I don't know why this is happening, the code is the same as it was on the original site.

Link to comment
Share on other sites

about the file filezilla said that all file were trasferred correctly.

 

I'm testing on the official site, if i toggle off the browser cookie storage I have the same behaviour.

 

I'm still testing but I think that the problem is in the writing of the cookies, I got 0 cookies from the copy and 1 from the main site.

 

how can I check this? any ideas?

 

Basically from what I understood till now it redirects me to the login screen because it founds no cookie and no user logged in.

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...