mtdkuser
mtdkuser

Reputation: 31

Error 302: ERR_TOO_MANY_REDIRECTS in Prestashop Back Office

I would like to set up a local Docker-based development environment for theme and plugin development. The environment would be a copy of the existing store, however, I have encountered an issue. Despite completing the migration steps and adjusting the configuration settings, I cannot log into PrestaShop Back Office (BO). After migrating the database and setting the store's URLs in the appropriate tables in the database, the store seems to work locally at first sight. However, I can't log into the admin panel because when I try to access the Back Office (from the URL I defined in the PS_FOLDER_ADMIN environment variable in docker-compose.yaml), the site falls into redirect loop (error 302 - ERR_TOO_MANY_REDIRECTS). Has anyone of you encountered this issue before and is able to help me solve it?

Additional information:

Here's what I've done so far:

Back Office should work without a problem just like the other pages in the store.

The problem persists in different browsers, which rules out a cookie issue. Thank you in advance for your help!

Upvotes: 1

Views: 405

Answers (1)

mtdkuser
mtdkuser

Reputation: 31

I almost gave up, but finally managed to find a solution to my problem.... During desperate attempts to "transplant" individual database tables from a clean store database to my imported database (which comes from a production environment), I found that rewriting the "ps_tab" table restores the possibility to get to backoffice eliminating the problem of redirect loops.

Honestly, I have no idea what exactly the problem is (inconsistency of data structure in the tables between my production PrestaShop instance and the local Docker instance?), but I don't even have the strength to analyze it anymore. I hope this topic will help someone struggling with a similar problem someday.

Upvotes: 2

Related Questions