Magento升级到1.9之后,重置密码页面空白问题的解决方法

时间:2018-05-18 09:56人气:0

问题

将旧版Magento升级到版本1.9.2.2后,我注意到重置密码页面是空白的,其他一切正常工作,输入邮箱地址,可以正常接收到重置密码的链接,但点击链接后是个空白页面。 我检查了我的日志文件,并没有发生错误。



原因

事实证明,对customer.xml文件进行了更改。 customer_account_resetpassword块已重命名为customer_account_changeforgotten。 由于我的自定义主题包含有自己的customer.xml文件,因此Magento内核中包含的原始customer.xml文件被忽略。 安装安全补丁SUPEE-6788也可能导致此问题。


解决方法

只需更新您主题所使用的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>

把这段话替换为以下这段

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