Blog

FIX – Customer cannot login to magento 1.8.1

David Hellowell

FIX – Customer cannot login to magento 1.8.1

Following an upgrade to magento 1.8.1 on our development servers , we noticed that customers are unable to login to their account.

The issue is arising because the custom login form does not contain any form_key and there is a form key validation happening in loginPostAction of magento.

Here is the solution:

1 – Go to template/customer/form/login.phtml and template/persistent/customer/form/login.phtml and under

<ul class="form-list">

add the following code in the login form

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

If you are using the login form in different templates then you use add the form_key to the other parts as well.

I hope this helps.

EDIT:

– We are aware that this issue also exists while updating the quantity of cart items, the same solution applies there.

– Previously there were two methods listed in this post to fix the problem but editing core files goes against Magento development standards so those instructions have now been removed.

More Help with Magento

If you need more help with Magento, see my extended post on how to configure a new Magento install for SEO.

Featured

Got a project in mind? Our friendly team would love to hear from you

Get In Touch

Want more information?

View Our ResourcesView Our Work

For exclusive digital marketing news and resources, subscribe to the Blueclaw insight list.