Error - Magento 1: PHP Fatal error: Call to a member function setCustomerId() on a non-object in ... /app/code/core/Mage/Customer/controllers/AccountController.php on line 601 Print

  • 172

If you get the following reported in your error logs:

PHP Fatal error:  Call to a member function setCustomerId() on a non-object in ... /app/code/core/Mage/Customer/controllers/AccountController.php on line 601
This occurs when a customer clicks the forgotten password link on the frontend; they are sent an email with a link to click and when they click the link in the email, a blank white page is shown in the browser, or an internal server error such as the following:
Server error
The website encountered an error while retrieving https://www.example.co.nz/customer/account/resetpassword/?id=1271&token=b0e401762edadb425d4cdf65dd412bf9. It may be down for maintenance or configured incorrectly.
Here are some suggestions:
Reload this webpage later.
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request..
 
This occurs when you have upgraded Magento and the theme is not compatible. This is a relatively easy fix. Simply edit app/design/frontend/default/[your_custom_theme_folder]/layout/customer.xml and add the following code direct before the </layout> tag:
 
<!--
Customer account reset password
-->
    
<customer_account_changeforgotten 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_changeforgotten" name="changeForgottenPassword" template="customer/form/resetforgottenpassword.phtml"/>
        </reference>
    </customer_account_changeforgotten>
 
 

Was this answer helpful?

« Back