1

I updated to the most recent Enterprise version and can not login anymore. Posting the login form just brings me back to this form.

3

This update includes a formkey - probably against CSRF attacks - for all pages via the file core.xml

<block name="formkey" type="core/template" template="core/formkey.phtml" />

If you have overwritten the templates persistent/customer/form/login.phtml and/or persistent/checkout/onepage/login.phtml make sure to include the new line

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

somewhere in the form.

Otherwise the following check in Mage_Customer_AccountController::loginPostAction() fails:

/**
 * Login post action
 */
public function loginPostAction()
{
    if (!$this->_validateFormKey()) {
        $this->_redirect('*/*/');
        return;
    }

The same applies for other templates (search for getBlockHtml('formkey'))

  • template/catalog/product/view.phtml
  • template/checkout/cart.phtml
  • template/review/form.phtml
  • ...
2

I'm not able to comment on Alex' answer (not enough reputation), but this is pretty much just a big confirmation from me to his answer. I ran into the same issue when upgrading to EE 1.13.1.0, using a custom theme.

The gist link below includes all the templates that include key validation for EE 1.13.1.0 (and CE 1.8.1). Double check those for the form key block, if you've overwritten them in a custom theme.

https://gist.github.com/drobinson/7913822

Update: Forgot linking from SE was frowned upon, so including the template list in my post instead

$ grep -lR "getBlockHtml('formkey');" app/design

app/design/frontend/base/default/template/checkout/cart.phtml
app/design/frontend/base/default/template/checkout/multishipping/overview.phtml
app/design/frontend/base/default/template/checkout/onepage/login.phtml
app/design/frontend/base/default/template/customer/form/login.phtml
app/design/frontend/base/default/template/persistent/checkout/onepage/login.phtml
app/design/frontend/base/default/template/persistent/customer/form/login.phtml
app/design/frontend/base/default/template/review/form.phtml
app/design/frontend/base/default/template/sales/reorder/sidebar.phtml
app/design/frontend/base/default/template/wishlist/view.phtml
app/design/frontend/enterprise/default/template/checkout/cart.phtml
app/design/frontend/enterprise/default/template/checkout/multishipping/overview.phtml
app/design/frontend/enterprise/default/template/checkout/onepage/login.phtml
app/design/frontend/enterprise/default/template/checkout/widget/sku.phtml
app/design/frontend/enterprise/default/template/customer/form/login.phtml
app/design/frontend/enterprise/default/template/persistent/checkout/onepage/login.phtml
app/design/frontend/enterprise/default/template/persistent/customer/form/login.phtml
app/design/frontend/enterprise/default/template/review/form.phtml
app/design/frontend/enterprise/iphone/template/wishlist/view.phtml

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