0

This issue is only on Chrome. I got redirected to the login page after login. I tried the following:

1. I put this

<?php echo $this->getBlockHtml('formkey'); ?>

after the <form>

2. from system->configuration->web I put the Cookie Lifetime to 9600 or 96000 or 0 the Cookie Path and Cookie Domain i left it empty and i set the Use HTTP Only to yes or no , but the thing is whatever combination settings I do i still got redirected to the login page.

3. I checked the logs file, nothing relevant. I cleared the cache etc

4. I put this code:

if (!($formKey = $this->getRequest()->getParam('form_key', null)) || $formKey != Mage::getSingleton('core/session')->getFormKey()) {
    $this->getRequest()->setParams(array('form_key' =>Mage::getSingleton('core/session')->getFormKey()));
}

in my AccountController.php in the loginPostAction function, but it changed nothing.

After I clear my browser cache on chrome it works , but i logout and login in again i am redirected to login page. Any idea ??

[update] Im storing the session in db : <session_save>db</session_save>

11
  • I think multiple cookie domain are creating. Check the cookie domain from browser. Jan 27, 2017 at 11:25
  • theoretically i shouldn't do any settings to my browser, I cannot tell to my customers to go to chrome ->settings -> do that or other things :) Thx for the understanding Jan 27, 2017 at 11:27
  • I am just asking to check to you not customer and accordingly you can resolve it. Jan 27, 2017 at 11:31
  • I have 2 cookies from google analytics like mywebsite.de and 3 others on www.mywebsite.de (frontend, frontend_cid and Local_storage) Jan 27, 2017 at 11:37
  • if I remove the cookies from www.mywebsite.de i can login instantly Jan 27, 2017 at 11:38

1 Answer 1

0

If you are facing this issue in you local machine.

Then change your base Url as

http://localhost/magento/ to http://127.0.0.1/magento/

1
  • I'm on live :) like https://example.com Jan 27, 2017 at 11:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.