任何人都可以帮助解决这个 Magento 错误吗?
致命错误:调用成员函数 getArea() 在非对象上 {目录}/includes/src/Mage_Core_Model_App_Area.php 第 155 行
当我安装在 Magento 的全新安装中编写的扩展时出现。当移植到开发服务器时,它把它拿下来了,我似乎找不到它的起源。禁用扩展不会改变任何事情。以及清除缓存和所有常见的 Magento 问题。据我所知,我已确保文件权限正确。
Fatal error: Call to a member function
getArea() on a non-object in
{directory}/includes/src/Mage_Core_Model_App_Area.php
on line 155
Cropped up when I installed an extension that I wrote on a clean install of Magento. When ported to the dev server it took it down and I cant seem to find where it has originated. Disabling the extension changes nothing. Along with clearing the cache and all the regular Magento hiccups. I've ensured that file permissions are correct to the best of my knowledge.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
错误中的文件名
表明 Magento 正在以编译器模式运行。安装新的
在编译模式下运行的模块可以使 Weird Things™ 发生。我想说你的行为是一件奇怪的事情
打开一个 shell 并将目录更改为应用程序的根目录。然后输入“
从这个
shell
子文件夹运行”是必需的,因为compiler.php
假定这是包含一些重要文件时的基本目录。您应该看到类似于“要禁用编译器,请键入”的
输出。您可以通过查看“如果此文件中的两行代码被注释,Magento 将不会查找“已编译”代码来检查此脚本是否已完成其工作”
。
如果不是,则使用
#
标记进行注释(启用/禁用脚本使用并查找#
和#
仅有的)。这样做,你的错误就会消失(或者至少更改为不同的内容,以便进一步调试)
The name of the file in your error
indicates that Magento is operating with the compiler mode on. Installing new
modules while operating in complied mode can make Weird Things™ happen. I'd say your behavior qualifies as a weird thing
Open a shell and change directories to the root of your application. Then type
Running from this
shell
sub folder is required, as thecompiler.php
assumes that's the base dire when including some important files. You should see output something likeTo disable to complier, type
You can check to see if this script has done it's job by looking at
If the two lines of code in this file are commented, Magento won't look for "compiled" code.
If they aren't, then comment then out with the
#
mark (the enable/disable script uses and looks for a#
and a#
only).Do that, and your error should go away (or at least change to something different, allowing further debugging)
/includes/src/ 中的路径显示您正在使用 magento 编译器。您必须记住,每次安装某些内容时:
path in /includes/src/ shows that you are using magento compiler. You have to remember that each time you install something: