【问题标题】:Magento :Password reset link is not workingMagento:密码重置链接不起作用
【发布时间】:2011-12-16 11:05:34
【问题描述】:

我正在尝试为我的商店重置我的测试客户帐户密码,当我单击忘记密码链接时,它要求我输入电子邮件地址,当我输入有效的电子邮件地址时,它说密码重置链接已发送到您的邮件&当我单击显示错误Fatal error: Call to a member function setCustomerId() on a non-object in /var/www/websites/jivity/app/code/core/Mage/Customer/controllers/AccountController.php on line 587的链接时,它正在向我转发电子邮件中的链接,我该如何解决此错误?并提前致谢。

【问题讨论】:

  • 那是什么方法?我在 1.5.1.0 发行版中的第 587 行没有调用 setCustomerId()
  • 您使用的是什么版本的 Magento?
  • 我正在使用最新版本的 magento,即magento-1.6

标签: magento magento-1.5


【解决方案1】:

刚刚在升级的 1.6.1.0 站点上修复了同样的问题 - 您使用的是过期的 customers.xml,比较您的副本和 app/design/frontend/base/default/layout/customer.xml 以找到需要做的更改

【讨论】:

  • 在 1.7.0.2 站点上使用了相同的修复程序。谢谢!
【解决方案2】:

如果有人想知道,在 customer.xml 文件的新版本 (1.6++) 中添加了以下位:

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

【讨论】:

  • 谢谢,这解决了我在 Magento 1.6.2 上的问题
  • 在 Mangento 1.9.1 上修复了我的问题(从 1.5 开始)
【解决方案3】:

如果您使用的是 Magento 1.9.1,这是一个对我有用的解决方案。

如果您的主题不包含任何特定的自定义配置或布局设置,您可以安全地删除位于 /app/design/frontend/default/&lt;your_theme_package&gt;/&lt;your_theme_name&gt;/layout/customer.xml 的 customer.xml(或仅重命名为 customer1.xml)文件

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

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

【讨论】:

  • 在批评补丁更新 (6788) 开始在某些安装中出现此问题后,这对 Magento 1.7 也是有效的。
【解决方案4】:

请在您的 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>

它正在工作

【讨论】:

    【解决方案5】:

    我尝试了上述方法,但没有奏效。从我看到的另一个提示中,我将上面相同的代码添加到同一布局文件夹中的“mageb2bextensionscustomer.xml”中,清除了所有缓存,它现在可以工作了。 :-)

    【讨论】:

    • 这是因为你的扩展覆盖了默认的客户 xml。
    【解决方案6】:

    始终备份您的文件!

    我找到了解决问题的快速方法:我将app/design/frontend/your_theme_package/your_theme_name/layout/ 中我的主题使用的自定义customer.xml 替换为app/design/frontend/base/default/layout/customer.xml 中的文件。

    现在它工作得很好。

    【讨论】:

      猜你喜欢
      • 2016-04-30
      • 1970-01-01
      • 1970-01-01
      • 2016-11-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多