In last month, I had a task to upgrade one Magento site to the latest version 22.214.171.124.
I upgraded the site successfully to the latest version of Magento. But while testing of that site we found one critical error related to reset password, which I want to discuss here:
In login page on click of forgot password link, Magento asks customer’s email address to send reset password link to their email address.
Above functionalities were working fine.
But in the reset password mail while clicking on reset password link, the page gave the following error:
PHP Fatal error: Call to a member function setCustomerId() on a non-object in app/code/core/Mage/Customer/controllers/AccountController.php on line 587
I was just shocked, and tried hard to find the cause and the solution of that problem. For that I had searched the web, and at last found the cause and solution of the problem.
The error was occurred because of incompatible customer.xml file in our custom theme. Magento did many useful changes in customer.xml file in latest version 126.96.36.199.
Now the solution of above error is very simple. Just remove the customer.xml file used by your theme from /app/design/frontend/<your_package_name>/<your_theme_name>/layout/. By doing this Magento will use the customer.xml file from the base/default theme.
If you have did some useful changes in customer.xml file according to your theme and not able to remove that file then update your customer.xml file by putting the under given section in it.
<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"/> </reference> </customer_account_resetpassword>
Now see the result, the error will go away.
Also refer the under given link to get knowledge about some nasty issues which can occur after upgrading magento to 1.7.
Hope this will help you.