1

I'm having the following problem: the customer logs in, is redirected to main page, but gets redirected back to login page. There is no error message.

On failed login with wrong credentials there is an error message displayed.

Login to admin works ok.

EDIT: this seems to be related to the website restrictions funtionality (Magento EE)

EDIT2: It is not the form key issue. Looks like that Magento does not recognise that the customer is logged in. If the website restrictions is disabled, the login appears to work (no error message, user redirected to front page, as should), but actually does not: the user simply in not logged in, login link is displayed etc.

1

You have to keep form_key inside login phtml file.Inside form tag put line,

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

After clear cache and check it. Thanks.

1

The issue can be related with your login form which may be missing form_key hidden field. If so just add the below code in the form:

<input name="form_key" type="hidden" value="<?php echo Mage::getSingleton('core/session')->getFormKey() ?>" />

Debugging Tips:
Try to add breakpoint at the start of Mage_Customer_AccountController::loginPostAction() function for further debugging.
Also you can check the redirection status in Network tab of chrome console.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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