cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot access backend after enabled cookies

SOLVED

Cannot access backend after enabled cookies

Hi,

 

I a using Magento 2.2 and I have enabled cookies from the backend setting, everything was working fine until I went to log in again into the backend, and starting to getting this error (check below).

 

Does any one know what I can do to fix this problem?

 

chrome:

error_chrome.JPG

firefox:

error_firefox.JPG

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Cannot access backend after enabled cookies

Hi @robertbits

 

Looks like you have hard cache/cookie issue - can you manually remove cookies from your browser and try for the same ?

 

Also someone has already raise this issue , below i am sharing link for the same :

 

https://community.magento.com/t5/Installing-Magento-2-x/Error-too-many-redirects/m-p/89422#M3688

 

https://magento.stackexchange.com/questions/94722/magento-2-error-err-too-many-redirects

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

View solution in original post

9 REPLIES 9

Re: Cannot access backend after enabled cookies

Clear browser cookie and cache and run below command,

php bin/magento cache:flush

Or try with Private/Incognito browser and check its working or not.

If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial

Re: Cannot access backend after enabled cookies

Thanks for the reply.

 

I have tried to run the command before - didn't solve the problem

I also tried to incognito mode and even a different browser - still didn't work Smiley Sad

Re: Cannot access backend after enabled cookies

Hi @robertbits

 

Looks like you screenshot is not visible to us !

 

Can you please check or post exact error you are getting - so its helps us to troubleshoot the issue !!

 

 

if issue solved,Click Kudos & Accept as Solution

Re: Cannot access backend after enabled cookies

@Manthan Dave

Sorry about that:

 

in chrome I get this error:

This page isn’t working
advert redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS

and in firefox I get:

The page isn’t redirecting properly

Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

    This problem can sometimes be caused by disabling or refusing to accept cookies.

Something that I didn't say before, is that magento is running in a local environment using xampp server

Re: Cannot access backend after enabled cookies

@robertbits try to remove the cookie setting from your core_config_data table, clear cache and try again.

 

if issue solved,Click Kudos & Accept as Solution

Re: Cannot access backend after enabled cookies

@mhauri

I have edited the table, found the filed "web/cookie/cookie_restriction" value was 1.

- put the value to 0, which i thing it will disable it - didn't work

- put the value to null - didn't work either. 

 

Is there another value I need to modify?

Re: Cannot access backend after enabled cookies

Hi @robertbits

 

Looks like you have hard cache/cookie issue - can you manually remove cookies from your browser and try for the same ?

 

Also someone has already raise this issue , below i am sharing link for the same :

 

https://community.magento.com/t5/Installing-Magento-2-x/Error-too-many-redirects/m-p/89422#M3688

 

https://magento.stackexchange.com/questions/94722/magento-2-error-err-too-many-redirects

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

Re: Cannot access backend after enabled cookies

@Manthan Dave

 

problem solved. thank you all for helping.

 

The solution was in here:

https://magento.stackexchange.com/questions/94722/magento-2-error-err-too-many-redirects

 

In my case, I was importing an already existing Magento 2 database. The reason I was getting the error was because of the cookie domain in the database. Go to your database and look in the table core_config_data. You should see a path called web/cookie/cookie_domain. Make sure the domain matches the one you installed Magento 2 on. Ex: If you installed Magento 2 on local.dev/<magento-root> the entry in web/cookie/cookie_domain should be local.dev

Re: Cannot access backend after enabled cookies

Hi @robertbits

 

Glad to know that you have resolved your issue.

 

Happy to help and keep helping Smiley Happy

if issue solved,Click Kudos & Accept as Solution