Magento:密码重置链接不工作

Magento:密码重置链接不工作,magento,magento-1.5,Magento,Magento 1.5,我正在尝试重置我商店的测试客户帐户密码,当我点击忘记密码链接时,当我输入一个有效的电子邮件地址时,它会询问我一个电子邮件地址,它说密码重置链接已发送到您的邮件&当我点击链接时,它会在电子邮件中转发我一个链接,它会显示一个错误致命错误:调用成员函数setCustomerId()在第587行的/var/www/websites/jivity/app/code/core/Mage/Customer/controllers/AccountController.php中的非对象上,如何修复此错误Thanx

我正在尝试重置我商店的测试客户帐户密码,当我点击忘记密码链接时,当我输入一个有效的电子邮件地址时,它会询问我一个电子邮件地址,它说密码重置链接已发送到您的邮件&当我点击链接时,它会在电子邮件中转发我一个链接,它会显示一个错误
致命错误:调用成员函数setCustomerId()在第587行的/var/www/websites/jivity/app/code/core/Mage/Customer/controllers/AccountController.php中的非对象上,如何修复此错误Thanx提前。

刚刚在升级的1.6.1.0网站上修复了相同的问题-您使用的是过时的customers.xml,请将您的副本与
app/design/frontend/base/default/layout/customer.xml

进行区分,以便在新版本(1.6++)中查找需要进行的更改在customer.xml文件中,添加了以下位:

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

重置密码
重置密码
第/1页column.phtml
重置密码

我尝试了上述方法,但没有成功。从我看到的另一个技巧中,我将上述相同的代码添加到同一布局文件夹中的“mageb2bextensscustomer.xml”中,清除了所有缓存,现在就可以工作了。:-)

请在costomer.xml[app/design/frontend///layout/customer.xml]文件中添加以下代码

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

重置密码
重置密码
第/1页column.phtml
重置密码

如果您使用的是Magento 1.9.1

,这是一个对我有效的解决方案

如果您的主题不包含任何特定的自定义配置或布局设置,您可以安全地删除位于
/app/design/frontend/default///layout/customer.xml

如果删除此文件,magento将加载默认配置选项 (带有更新)从出厂默认的magento主题。 /app/design/frontend/base/default/layout/customer.xml


请记住通过管理区刷新/刷新您的magento配置,这将强制重新加载customer.xml文件。

始终备份您的文件

我找到了一个快速解决问题的方法:我将
app/design/frontend/your_theme\u package/your_theme\u name/layout/
中我的主题使用的自定义
customer.xml
替换为
app/design/frontend/base/default/layout/customer.xml中的文件


现在它工作正常。

这是什么方法?我在1.5.1.0发行版中的第587行没有调用setCustomerId(),您使用的是哪个版本的Magento?我使用的是最新版本的Magento I,e。magento-1.6谢谢,这为我解决了magento 1.6.2上的问题。Mangento 1.9.1(从1.5开始)上的fixed mine在1.7.0.2站点上使用了相同的修复。谢谢这是因为您的扩展正在覆盖默认的客户xml。在批评家补丁更新(6788)开始在某些安装中出现此问题后,这同样适用于Magento 1.7。