Magento:被遗忘的Pword返回空白浏览器页面
问题描述:
我真的很希望这里有人能够帮助解决这个问题。Magento:被遗忘的Pword返回空白浏览器页面
我使用的Magento 1.6.1.0新安装
如果客户点击前端忘记密码的链接,他们收到一封电子邮件的链接点击。当他们点击电子邮件中的链接时,浏览器中会显示一个空白页面(不提示重置pword)。当电子邮件中的链接启动的路径是这样的:
www.mystore.com/customer/account/resetpassword/?id=4 token=26f8abcc1efd5559ce81ced2706586db
The "error_log" said:
30-Nov-2011 07:42:50] PHP Fatal error: Call to a member function setCustomerId() on a non-object in /home3/bestcara/public_html/app/code/core/Mage/Customer/controllers/AccountController.php on line 587
,这里是从AccountController.php
* Display reset forgotten password form
*
* User is redirected on this action when he clicks on the corresponding link in password reset confirmation email
*
*/
public function resetPasswordAction()
{
$resetPasswordLinkToken = (string) $this->getRequest()->getQuery('token');
$customerId = (int) $this->getRequest()->getQuery('id');
try {
$this->_validateResetPasswordLinkToken($customerId, $resetPasswordLinkToken);
$this->loadLayout();
// Pass received parameters to the reset forgotten password form
$this->getLayout()->getBlock('resetPassword')
->setCustomerId($customerId),<------------------------------------Line 587
->setResetPasswordLinkToken($resetPasswordLinkToken);
$this->renderLayout();
} catch (Exception $exception) {
$this->_getSession()->addError(Mage::helper('customer')->__('Your password reset link has expired.'));
$this->_redirect('*/*/');
}
}
的代码块我真的需要尽快解决这个问题。任何帮助深表感谢!
答
貌似不支持我的主题为Magento的1.6.1.0
去: 应用程序/设计/前端/预设/ [your_custom_theme_folder] /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>
工程就像一个魅力!
+0
这适用于我的1.7.0.2,但您必须确保清除所有缓存以使此更改生效! – stitz
显然有异常的地方开火的答案,我们需要知道它是什么帮助你。检查它在var/log/exception.log文件中的内容。确保magento错误记录处于打开状态。 – georgiecasey
开发者/日志设置已启用,但我没有var/log/exception.log任何地方。我读过Magento论坛,你可以检查var/report /文件夹中的异常调试痕迹。该目录中有2个文件。这有帮助吗? – Andrea
这是http://stackoverflow.com/questions/8331574/magento-blank-page-customer-forgotten-password-email-link的副本。请只发布您的问题一次。这个问题应该被删除。 –