【问题标题】:Fatal error: Call to undefined method Mage::helper() in /home/primasource/public_html/includes/src/Mage_Core_Model_Resource_Setup.php on line 308致命错误:在第 308 行的 /home/primasource/public_html/includes/src/Mage_Core_Model_Resource_Setup.php 中调用未定义的方法 Mage::helper()
【发布时间】:2015-02-06 16:04:49
【问题描述】:

我的主页出现错误。我不知道问题是什么..同样请求支持。尝试了所有步骤。搜索 answer.atal 错误:在第 308 行调用 /home/primasource/public_html/includes/src/Mage_Core_Model_Resource_Setup.php 中未定义的方法 Mage::helper()

【问题讨论】:

    标签: magento


    【解决方案1】:

    尝试再次编译,

    转到您的管理面板 > 系统菜单 -> 工具 > 编译器 > 运行编译过程或禁用

    这应该可以解决问题。

    【讨论】:

      【解决方案2】:

      听起来您正在处理一个被严重入侵的系统——在标准系统中,静态Mage::helper 方法定义在

      #File: app/Mage.php
      public static function helper($name)
      {
          $registryKey = '_helper/' . $name;
          if (!self::registry($registryKey)) {
              $helperClass = self::getConfig()->getHelperClassName($name);
              self::register($registryKey, new $helperClass);
          }
          return self::registry($registryKey);
      }
      

      如果您的系统找不到这个,这意味着有人编辑了您的核心app/Mage.php 以删除此方法,有人删除了Mage 类,或者有人更改了您的系统以使用不同的Mage 类.在那里开始调试,祝你好运!

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-10-12
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-04-19
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多