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 1.7.0.2.

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 1.7.0.2.

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>

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.

http://indiestechtips.wordpress.com/2012/08/18/problems-with-magento-while-upgrading-to-1-7/

Hope this will help you.

Thanks.

About these ads

Speak Your Mind

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: