致命错误:在非对象上调用成员函数 setTitle()
当我尝试下订单时,在选择送货方式时出现错误,提示“
Fatal error: Call to a member function setTitle() on a non-object in /home/exclus31/public_html/../../../app/code/core/Mage/Customer/Block/Form/Login.php on line 40
但下订单没有问题并收到特定订单的确认消息”。
有人知道为什么会显示此错误以及解决方案吗?
When I try to placing an order, while selecting the shipping method an error is getting saying
Fatal error: Call to a member function setTitle() on a non-object in /home/exclus31/public_html/../../../app/code/core/Mage/Customer/Block/Form/Login.php on line 40
But there is no problem for placing the order and got the confirmation message for the particular order.
Any one know why this error is shown and a solution for this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我也有这个错误。这是因为在加载布局之前,我在
IndexAction()
中调用了getLayout()
。只需首先调用loadLayout()
即可,如下所示:我希望这会有所帮助
I had this error as well. It was because I was calling
getLayout()
in myIndexAction()
before I had loaded the layout. Just callloadLayout()
first, like so:I hope this helps