Solved: Fatal error on reset password page after upgrade to Magento CE 1.7

Hello friends,

In last month, I had a task to upgrade one Magento site to the latest version

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

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>
    <reference name="root">
        <action method="setTemplate">
        <action method="setHeaderTitle" translate="title" module="customer">
            <title>Reset a Password</title>
    <reference name="content">
        <block type="customer/account_resetpassword" name="resetPassword" template="customer/form/resetforgottenpassword.phtml"/>

That’s it.

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.


Speak Your Mind

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: