Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magento password-reset not working

I have a Magento webshop (1.9.2.3.) with a lot of registered customers. When going to My Account -> Forgot password, a registered customer can fill out his/her e-mail address. When clicking on 'Send' button, the shop shows an 'Server Error 500'.

It's the only place where the error shows up. What can be the problem? What to do to fix this?

This is the page and you can give it try with my e-mail: [email protected] https://www.hoesjesonline.nl/customer/account/forgotpassword/

I hope there's a solution.

PS: The problem was there with Magento 1.9.2.2, just upgraded to 1.9.2.3 and it's still there.

UPDATE: Error from log: [Mon Jan 25 15:14:00.768731 2016] [:error] [pid 10335] [client 77.172.241.31:62120] PHP Fatal error: Call to a member function getBackend() on a non-object in /home/hoesjeson/domains/hoesjesonline.nl/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 1548, referer: https://www.hoesjesonline.nl/customer/account/forgotpassword/ [Mon Jan 25 15:14:34.977753 2016] [:error] [pid 9480] [client 77.172.241.31:62129] PHP Fatal error: Call to a member function getBackend() on a non-object in /home/hoesjeson/domains/hoesjesonline.nl/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php on line 1548, referer: https://www.hoesjesonline.nl/customer/account/forgotpassword/

like image 285
Peter van Remmen Avatar asked Feb 07 '23 22:02

Peter van Remmen


2 Answers

Since Magento 1.9.2.2 it is required to send a form key with the forgot password form.

In your template customer/form/forgotpassword.phtml put:

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

Just under the <form action="..."> tag. Refresh the cache and see if the hidden input with a form key is present in the page.

Hopefully this will solve your issue :)

like image 113
Olav van Schie Avatar answered Feb 27 '23 11:02

Olav van Schie


Open customer/form/forgotpassword.phtml from your theme. Please first check form action. it should be baseurl+customer/account/forgotpasswordpost/

<form action="baseurl+/customer/account/forgotpasswordpost/">

Now check if form key is exist or not. If form key not exist then put below line between form tag.

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

Dont forget to flush cache. Hope it helps you.

like image 45
Makwana Ketan Avatar answered Feb 27 '23 09:02

Makwana Ketan