【问题标题】:Magento password-reset not workingMagento密码重置不起作用
【发布时间】:2016-04-30 20:13:15
【问题描述】:

我有一个 Magento 网店 (1.9.2.3.),有很多注册客户。在我的账户 -> 忘记密码时,注册客户可以填写他/她的电子邮件地址。单击“发送”按钮时,商店会显示“服务器错误 500”。

这是唯一出现错误的地方。可能是什么问题?如何解决这个问题?

这是页面,您可以通过我的电子邮件尝试一下:pvanremmen@prsocial.nl https://www.hoesjesonline.nl/customer/account/forgotpassword/

我希望有一个解决方案。

PS:问题出在 Magento 1.9.2.2,刚刚升级到 1.9.2.3,它仍然存在。

更新: 来自日志的错误: [Mon Jan 25 15:14:00.768731 2016] [:error] [pid 10335] [client 77.172.241.31:62120] PHP 致命错误:在 /home/hoesjeson/ 中的非对象上调用成员函数 getBackend() domain/hoesjesonline.nl/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php 在第 1548 行,引用者:https://www.hoesjesonline.nl/customer/account/forgotpassword/ [2016 年 1 月 25 日星期一 15:14:34.977753] [:error] [pid 9480] [client 77.172.241.31:62129] PHP 致命错误:在 /home/hoesjeson/ 中的非对象上调用成员函数 getBackend() domain/hoesjesonline.nl/public_html/app/code/core/Mage/Eav/Model/Entity/Abstract.php 在第 1548 行,引用者:https://www.hoesjesonline.nl/customer/account/forgotpassword/

【问题讨论】:

  • 您应该检查日志。您可以在 magento 安装的根文件夹中的 /var/log 中找到它们。检查 exception.log 和 system.log 并将其发布在此处。
  • 并检查您的 Apache 错误日志以获取有关失败原因的更多信息。
  • @Peter 过去您升级到 Magento 1.9.2.2 还是全新安装?
  • 不,这是升级。不是干净的安装。 @Ahmed.hoban 我禁用了日志,所以我要激活它并重试
  • @Ahmed.hoban:查看我的第一篇帖子更新错误日志

标签: magento passwords server-error reset-password customer


【解决方案1】:

从 Magento 1.9.2.2 开始,需要在忘记密码的表单中发送表单密钥。

在您的模板customer/form/forgotpassword.phtml 中输入:

<?php echo $this->getBlockHtml('formkey'); ?>

就在&lt;form action="..."&gt; 标签下。 刷新缓存并查看页面中是否存在带有表单键的隐藏输入。

希望这能解决您的问题:)

【讨论】:

  • 感谢您的快速解答。 forgotpassword.phtml 中缺少表单密钥,但它没有解决错误。还有其他解决此问题的想法吗?
【解决方案2】:

从您的主题中打开 customer/form/forgotpassword.phtml。 请首先检查表单操作。它应该是 baseurl+customer/account/forgotpasswordpost/

<form action="baseurl+/customer/account/forgotpasswordpost/">

现在检查表单键是否存在。如果表单键不存在,则放在表单标签之间的行下方。

<?php echo $this->getBlockHtml('formkey'); ?>

不要忘记刷新缓存。 希望对你有帮助。

【讨论】:

    【解决方案3】:

    好的,我找到了开发人员的解决方案。升级 Magento 版本后,数据库中的客户表以某种方式损坏。重建数据库中的客户表就成功了!

    【讨论】:

      【解决方案4】:

      您可以尝试此修复,转到您主题的 layout/customer.xml 并添加:

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

      更多详情:http://www.dudesquare.nl/blog/2015/11/03/reset-password-blank-page-magento-1-9-2-2/

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2011-12-16
        • 1970-01-01
        • 2015-08-26
        • 2019-01-28
        • 2015-08-25
        • 2014-12-22
        • 1970-01-01
        • 2015-07-01
        相关资源
        最近更新 更多