Your customer forgets a password to her account in your Magento shop. “No problem,” she thinks, “I’ll just reset it and all will be fine.” Full of innocent optimism, she clicks on the “Forgot your password?” link on your site, enters her email address and hits “Submit”. But instead of receiving her new password, she is met with this type of error message:
Invalid method Mage_Customer_Model_Customer::changeResetPasswordLinkToken(Array ([0] => 783bcddd8666cb48a192207bafd7f84e ))
Not very good, is it? In the worst case, the customer will lose her patience and trust in your shop and buy whatever it is she is looking for somewhere else. In a better case, she will create a new account with a new email address and buy the product from you. In the best case, she will actually take the time to write you an email to let you know about this problem. (Presumably, you didn’t know about it until know, because if you did, you would have already fixed it, right? Right?!?)
If this happens to you, here are a few tips:
1) The password retrieval function was changed in the recent versions of Magento. Originally, Magento used to send the new password to the customer directly in an email, but since this could lead to security issues starting with Magento 1.6 or 1.7 the customer now receives a temporary link to a password reset page on your site. As such, the underlying Magento code has changed.
If you have recently upgraded to Magento 1.6 or higher and are using a custom theme, check whether you have customer.xml
file in your theme layout folder. If you do, try to temporarily rename it to something else (e.g. customer.xml.bk
), clear Magento cache, and see if the problem with the new password retrieval still persists. If it fixes the problem, it means that your theme’s customer.xml
file is outdated. Open it in your favorite editor and make sure it includes this section:
<customer_account_resetpassword 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_resetpassword" name="resetPassword" template="customer/form/resetforgottenpassword.phtml"> </block></reference> </remove></remove> </customer_account_resetpassword>
Save it and upload it back to your FTP. Ideally, you’d compare it with the base theme’s customer.xml
file in case there are some other differences.
2) If the above is not the problem, check if you have some 3rd party extensions installed which override the customer model. It’s possible these are outdated and need updating. Try disabling them one by one either in ‘System > Configuration > Advanced > Advanced’ or even better by setting the active
flag to false
in their configuration file under /app/etc/modules
.
3) Lastly, make sure that the customer model is not overridden in your local Magento code. Check /app/code/local/Mage/
. See if there’s a Customer
folder there and if there’s anything inside (possibly Customer/Model/customer.php
). If there is, it overrides the core Magento files and you will likely need to update this local override or disable it (in case you don’t need it anymore).
This last tip was the cause of the password retrieval problem in one of the shops that I manage. I inherited it after other developers and it took me quite some time to realize that they overrode the customer model in the local folder. Hooray for working with legacy code.
Thanks! This helped me a lot!!
Great, glad to hear that!
This fixed my problem to, thanks!
Awesome. I’m happy it helped you!
nice article, this article and other article from magentostack.com helped me to fix my problem. other article is http://www.magentostack.com/magento-reset-password-email-and-functionality-is-not-working-with-custom-theme/
Cool bananas. Thanks for sharing the link to the MagentoStack article.
Thanks for the post. I was looking for info on a login issue after applying SUPEE-6788 and you pointed me in the right direction. Thanks.
My pleasure, Derak. I’m glad you found it helpful.