Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento customer login page redirects to itself without any error

Tags:

php

magento

I'm having a problem whereby Magento will redirect the user to the front end login when entering correct credentials. This seems to only happen if the user has previously opened a different store view in the same browser. I have set the cookie domain in Magento admin to be the domain of each store view. I can clear the cache on the browser login to two stores and all be well until i log out of both then back into one and I'll get the problem.

Config is set to use SID on front end, but disabled i still get the problem.

Any suggestions? I'm using Magento 1.7 community edition.

like image 571
user2683224 Avatar asked Oct 31 '13 16:10

user2683224


1 Answers

Another situation that could cause the customer login issue is the missing form_key from login template.

In order to solve this please locate the login.phtml template in your theme Go to template/customer/form/login.phtml and template/persistent/customer/form/login.phtml and add the following code in the login form

<input type="hidden" name="form_key" value="<?php echo Mage::getSingleton('core/session')->getFormKey(); ?>" />
like image 98
aki Avatar answered Oct 22 '22 19:10

aki