Search code examples
magentofirefoxfrontendmagento-1.9

Magento 1.9.2.2 cannot create account and login on frontend


I'm using Firefox and I started to have a problem. I can't create new user in a Magento 1.9.2.2 in the frontend and also I can't login with a register user. In the backend I can create the user without problems.

This was not happening some time ago.

I tried these solutions and didn't work:

  • Add <?php echo $this->getBlockHtml('formkey') ?> to some files of my template.
  • Delete var/cache and var/session.
  • Change life cycle of the cookies.
  • Change domain name of the cookies.

Any idea? :(


Solution

  • If you cannot create a customer or login after applying patch SUPEE-6788 or upgrading to Magento 1.9.2.2 or later, this might be caused by missing form keys.

    Make sure to add form keys to all of your (custom) template files:

    In app/design/frontend/[package]/[theme]/template/customer/form/register.phtml and app/design/frontend/[package]/[theme]/template/persistent/customer/form/register.phtml

    Add

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

    after

    <input type="hidden" name="error_url" value="<?php echo $this->getErrorUrl() ?>" />