I have recently updated my Magento installation to version 1.9.3 (from 1.9.2)
Sadly, since this update, my customers can no longer reset their passwords, which makes the usage of those who forgot their password impossible.
I tried many of the suggested solutions on this site, but with no success so far.
The current flow and the problem
- So the user goes to our site, goes to the forgot password page and fills in his/her email address.
- An email is received with a link with the following format: https://www.example.com/nl/customer/account/resetpassword/?id=20643&token=5a6280b85233e7e0fc4caab5e07bba68
- If the user goes to this link, which I find odd, he will end up on the page https://www.example.com/nl/customer/account/forgotpassword/ (the get parameters are gone) This page shows 2 fields to enter a new password.
- Filling in a new password, and repeating it and submitting the form.
- Maintenance page is being shown, password has not been changed (can still not log in). The page that is called after submit is https://www.example.com/nl/customer/account/resetpasswordpost/
What I tried and issues
First of all, the error logs show nothing, like nothing went wrong, so that's a tad of a hassle to begin with.
Since I saw no resetpasswordpost page in the /layout/customer.xml I tried changing the form action from resetpasswordpost to resetpassword, because resetpassword IS mentioned in the customer.xml. This fixed the maintenance page issue but after submit I would ALWAYS get the message that the reset link had expired. So not sure if this is a step forward or not.
As suggested in many similar solutions, I added getBlockHtml('formkey'); ?> to the forms. But this also does not resolve the issue.
I also tried changing customer_account_resetpassword to customer_account_changeforgotten in the customer.xml file and other changes as suggested all over this site but still no success.
My code
/template/customer/form/forgotpassword.phtml
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magento.com for more information.
*
* @category design
* @package base_default
* @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
?>
<div class="page-title">
<h1><?php echo $this->__('Forgot Your Password?') ?></h1>
</div>
<?php echo $this->getMessagesBlock()->toHtml() ?>
<form action="<?php echo $this->getUrl('*/*/forgotpasswordpost') ?>" method="post" id="form-validate">
<?php echo $this->getBlockHtml('formkey'); ?>
<div class="fieldset">
<h2 class="legend"><?php echo $this->__('Retrieve your password here') ?></h2>
<p><?php echo $this->__('Please enter your email address below. You will receive a link to reset your password.') ?></p>
<ul class="form-list">
<li>
<label for="email_address" class="required"><em>*</em><?php echo $this->__('Email Address') ?></label>
<div class="input-box">
<input type="text" name="email" alt="email" id="email_address" class="input-text required-entry validate-email" value="<?php echo $this->escapeHtml($this->getEmailValue()) ?>" />
</div>
</li>
<?php echo $this->getChildHtml('form.additional.info'); ?>
</ul>
</div>
<div class="buttons-set">
<p class="required"><?php echo $this->__('* Required Fields') ?></p>
<p class="back-link"><a href="<?php echo $this->helper('customer')->getLoginUrl() ?>"><small>« </small><?php echo $this->__('Back to Login') ?></a></p>
<button type="submit" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Submit')) ?>" class="button"><span><span><?php echo $this->__('Submit') ?></span></span></button>
</div>
</form>
<script type="text/javascript">
//<![CDATA[
var dataForm = new VarienForm('form-validate', true);
//]]>
</script>
/template/customer/form/resetforgottenpassword.phtml
<?php
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magento.com for more information.
*
* @category design
* @package base_default
* @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
?>
<div class="page-title">
<h1><?php echo $this->__('Reset a Password'); ?></h1>
</div>
<?php echo $this->getMessagesBlock()->toHtml(); ?>
<form action="<?php echo $this->getUrl('*/*/resetpasswordpost'); ?>" method="post" id="form-validate">
<?php echo $this->getBlockHtml('formkey'); ?>
<div class="fieldset" style="margin-top: 70px;">
<ul class="form-list">
<li class="fields">
<div class="field">
<label for="password" class="required"><em>*</em><?php echo $this->__('New Password'); ?></label>
<div class="input-box">
<input type="password" class="input-text required-entry validate-password" name="password" id="password" />
</div>
</div>
<div class="field">
<label for="confirmation" class="required"><em>*</em><?php echo $this->__('Confirm New Password'); ?></label>
<div class="input-box">
<input type="password" class="input-text required-entry validate-cpassword" name="confirmation" id="confirmation" />
</div>
</div>
</li>
</ul>
</div>
<div class="buttons-set">
<p class="required"><?php echo $this->__('* Required Fields'); ?></p>
<button type="submit" title="<?php echo Mage::helper('core')->quoteEscape($this->__('Reset a Password')); ?>" class="button"><span><span><?php echo $this->__('Reset a Password'); ?></span></span></button>
</div>
</form>
<script type="text/javascript">
/*<![CDATA[*/
var dataForm = new VarienForm('form-validate', true);
/*]]>*/
</script>
/layout/customer.xml (this is just the original file, not edited)
<?xml version="1.0"?>
<!--
/**
* Magento
*
* NOTICE OF LICENSE
*
* This source file is subject to the Academic Free License (AFL 3.0)
* that is bundled with this package in the file LICENSE_AFL.txt.
* It is also available through the world-wide-web at this URL:
* http://opensource.org/licenses/afl-3.0.php
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to [email protected] so we can send you a copy immediately.
*
* DISCLAIMER
*
* Do not edit or add to this file if you wish to upgrade Magento to newer
* versions in the future. If you wish to customize Magento for your
* needs please refer to http://www.magento.com for more information.
*
* @category design
* @package base_default
* @copyright Copyright (c) 2006-2016 X.commerce, Inc. and affiliates (http://www.magento.com)
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
*/
Supported layout update handles (action):
- customer_account_index
- customer_address_index
- customer_address_view
- customer_account_login
- customer_account_logoutsuccess
- customer_account_create
- customer_account_forgotpassword
- customer_account_confirmation
- customer_account_edit
Supported layout update handles (special):
- default
-->
<layout version="0.1.0">
<!--
Default layout, loads most of the pages
-->
<default>
<!-- Mage_Customer -->
<reference name="top.links">
<action method="addLink" translate="label title" module="customer"><label>My Account</label><url helper="customer/getAccountUrl"/><title>My Account</title><prepare/><urlParams/><position>10</position></action>
</reference>
</default>
<!--
Load this update on every page when customer is logged in
-->
<customer_logged_in>
<reference name="top.links">
<action method="addLink" translate="label title" module="customer"><label>Log Out</label><url helper="customer/getLogoutUrl"/><title>Log Out</title><prepare/><urlParams/><position>100</position></action>
</reference>
</customer_logged_in>
<!--
Load this update on every page when customer is logged out
-->
<customer_logged_out>
<!---<reference name="right">
<block type="customer/form_login" name="customer_form_mini_login" before="-" template="customer/form/mini.login.phtml"/>
</reference>-->
<reference name="top.links">
<action method="addLink" translate="label title" module="customer"><label>Log In</label><url helper="customer/getLoginUrl"/><title>Log In</title><prepare/><urlParams/><position>100</position></action>
</reference>
<remove name="reorder"></remove>
</customer_logged_out>
<!--
Layout for customer login page
-->
<customer_account_login translate="label">
<label>Customer Account Login Form</label>
<!-- Mage_Customer -->
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="customer/form_login" name="customer_form_login" template="customer/form/login.phtml" />
</reference>
</customer_account_login>
<!--
Layout for customer log out page
-->
<customer_account_logoutsuccess translate="label">
<label>Customer Account Logout Success</label>
<!-- Mage_Customer -->
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="core/template" name="customer_logout" template="customer/logout.phtml"/>
</reference>
</customer_account_logoutsuccess>
<!--
New customer registration
-->
<customer_account_create translate="label">
<label>Customer Account Registration Form</label>
<!-- Mage_Customer -->
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
</reference>
<reference name="content">
<block type="customer/form_register" name="customer_form_register" template="customer/form/register.phtml">
<block type="page/html_wrapper" name="customer.form.register.fields.before" as="form_fields_before" translate="label">
<label>Form Fields Before</label>
</block>
</block>
</reference>
</customer_account_create>
<customer_account_forgotpassword translate="label">
<label>Customer Forgot Password Form</label>
<remove name="right"/>
<remove name="left"/>
<reference name="head">
<action method="setTitle" translate="title" module="customer"><title>Forgot Your Password</title></action>
</reference>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
<action method="setHeaderTitle" translate="title" module="customer"><title>Password forgotten</title></action>
</reference>
<reference name="content">
<!--<block type="core/template" name="forgotPassword" template="customer/form/forgotpassword.phtml"/>-->
<block type="customer/account_forgotpassword" name="forgotPassword" template="customer/form/forgotpassword.phtml" />
</reference>
</customer_account_forgotpassword>
<customer_account_changeforgotten translate="label">
<label>Reset a Password</label>
<remove name="right"/>
<remove name="left"/>
<reference name="head">
<action method="setTitle" translate="title" module="customer">
<title>Reset a Password</title>
</action>
</reference>
<reference name="root">
<action method="setTemplate">
<template>page/1column.phtml</template>
</action>
<action method="setHeaderTitle" translate="title" module="customer">
<title>Reset a Password</title>
</action>
</reference>
<reference name="content">
<block type="customer/account_changeforgotten" name="changeForgottenPassword" template="customer/form/resetforgottenpassword.phtml"/>
</reference>
</customer_account_changeforgotten>
<customer_account_confirmation>
<remove name="right"/>
<remove name="left"/>
<reference name="root">
<action method="setTemplate"><template>page/1column.phtml</template></action>
<action method="setHeaderTitle" translate="title" module="customer"><title>Send confirmation link</title></action>
</reference>
<reference name="content">
<block type="core/template" name="accountConfirmation" template="customer/form/confirmation.phtml"/>
</reference>
</customer_account_confirmation>
<customer_account_edit translate="label">
<label>Customer Account Edit Form</label>
<update handle="customer_account"/>
<reference name="root">
<action method="setHeaderTitle" translate="title" module="customer"><title>Edit Account Info</title></action>
</reference>
<reference name="my.account.wrapper">
<block type="customer/form_edit" name="customer_edit" template="customer/form/edit.phtml"/>
</reference>
<reference name="left">
<action method="unsetChild"><name>left.permanent.callout</name></action>
</reference>
</customer_account_edit>
<!--
Customer account pages, rendered for all tabs in dashboard
-->
<customer_account translate="label">
<label>Customer My Account (All Pages)</label>
<!--remove name="catalog.compare.sidebar"/>
<remove name="sale.reorder.sidebar"/-->
<!-- Mage_Customer -->
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
</reference>
<reference name="content">
<block type="page/html_wrapper" name="my.account.wrapper" translate="label">
<label>My Account Wrapper</label>
<action method="setElementClass"><value>my-account</value></action>
</block>
</reference>
<reference name="left">
<block type="customer/account_navigation" name="customer_account_navigation" before="-" template="customer/account/navigation.phtml">
<action method="addLink" translate="label" module="customer"><name>account</name><path>customer/account/</path><label>Account Dashboard</label></action>
<action method="addLink" translate="label" module="customer"><name>account_edit</name><path>customer/account/edit/</path><label>Account Information</label></action>
<action method="addLink" translate="label" module="customer"><name>address_book</name><path>customer/address/</path><label>Address Book</label></action>
</block>
<block type="checkout/cart_sidebar" name="cart_sidebar" template="checkout/cart/sidebar.phtml">
<action method="addItemRender"><type>simple</type><block>checkout/cart_item_renderer</block><template>checkout/cart/sidebar/default.phtml</template></action>
<action method="addItemRender"><type>grouped</type><block>checkout/cart_item_renderer_grouped</block><template>checkout/cart/sidebar/default.phtml</template></action>
<action method="addItemRender"><type>configurable</type><block>checkout/cart_item_renderer_configurable</block><template>checkout/cart/sidebar/default.phtml</template></action>
</block>
<block type="catalog/product_compare_sidebar" name="catalog.compare.sidebar" template="catalog/product/compare/sidebar.phtml"/>
<remove name="tags_popular"/>
</reference>
</customer_account>
<!--
Customer account home dashboard layout
-->
<customer_account_index translate="label">
<label>Customer My Account Dashboard</label>
<update handle="customer_account"/>
<!-- Mage_Customer -->
<reference name="root">
<action method="setTemplate"><template>page/2columns-left.phtml</template></action>
</reference>
<reference name="my.account.wrapper">
<block type="customer/account_dashboard" name="customer_account_dashboard" template="customer/account/dashboard.phtml">
<block type="customer/account_dashboard_hello" name="customer_account_dashboard_hello" as="hello" template="customer/account/dashboard/hello.phtml"/>
<block type="core/template" name="customer_account_dashboard_top" as="top" />
<block type="customer/account_dashboard_info" name="customer_account_dashboard_info" as="info" template="customer/account/dashboard/info.phtml"/>
<block type="customer/account_dashboard_newsletter" name="customer_account_dashboard_newsletter" as="newsletter" template="customer/account/dashboard/newsletter.phtml"/>
<block type="customer/account_dashboard_address" name="customer_account_dashboard_address" as="address" template="customer/account/dashboard/address.phtml"/>
</block>
</reference>
</customer_account_index>
<!--
Customer account address book
-->
<customer_address_index translate="label">
<label>Customer My Account Address Book</label>
<!-- Mage_Customer -->
<update handle="customer_account"/>
<reference name="my.account.wrapper">
<block type="customer/address_book" name="address_book" template="customer/address/book.phtml"/>
</reference>
</customer_address_index>
<!--
Customer account address edit page
-->
<customer_address_form translate="label">
<label>Customer My Account Address Edit Form</label>
<!-- Mage_Customer -->
<update handle="customer_account"/>
<reference name="my.account.wrapper">
<block type="customer/address_edit" name="customer_address_edit" template="customer/address/edit.phtml"/>
</reference>
</customer_address_form>
</layout>
maintainence.flag
file from your root.it may help you.