dquv73115 2011-09-13 12:29
浏览 32

为什么Magento网站的前端没有加载? - 致命错误:未找到“Mage__Helper_Data”类

I’ve got an issue with the front end of a magento site, it is throwing a 500 error. The back end admin is absolutely fine and functional, I'm able to log in no problem and there is no loss of product data.

I have un-commented out line 70 in my index.php file -

#ini_set(\'display_errors\', 1);

in order to see the errors, and this is what now displays when you load up the front end of the site - Fatal error: Class \’Mage__Helper_Data\’ not found in /var/www/vhosts/beta.mydomain.com/httpdocs/countrytoys/app/Mage.php on line 520

I reckon the double underscore here is to do with a module being missing or something..

This problem came to light after I refreshed all cache types in the admin area, but I suspect the problem was there beforehand but just bared it’s head after the cache refresh.

So far I have tried/checked -

  • deleting the contents of var/cache, var/session

  • The base URL in the db is correct

  • made all directories 755 permissions, and all files 644, I have also tried making index.php 755, and 777 on suggestion from other forums.

  • checked htaccess, all seems fine.

  • the physical files are all there on the server.

  • system.log seems to be consistently pointing to line 93 in Autoload.php -

    2011-09-12T15:18:52+00:00 ERR (3): Warning: include() [<a href=\'function.include\'>function.include</a>]: Failed opening \'Mage//Helper/Data.php\' for inclusion (include_path=\'/var/www/vhosts/beta.mydomain.com/httpdocs/countrytoys/app/code/local:/var/www/vhosts/beta.mydomain.com/httpdocs/countrytoys/app/code/community:/var/www/vhosts/beta.mydomain.com/httpdocs/countrytoys/app/code/core:/var/www/vhosts/beta.mydomain.com/httpdocs/countrytoys/lib:.:\')  in /var/www/vhosts/beta.mydomain.com/httpdocs/countrytoys/lib/Varien/Autoload.php on line 93
    

Other things I can think of that I have recently done include adding google analytics through admin, altering the code for links at the top of the site in app\design\frontend\default\blue_toys\template\page\html\header.phtml and entering some paypal details in order to set up the payment gateway.

installation details - ver -1.5.0.1, Theme - custom installed theme

Can anyone help? thanks, Luke

  • 写回答

2条回答 默认 最新

  • duan97689 2011-09-13 14:08
    关注

    Your error message shows two underscores between Mage and Helper, where there usually is only one of them. For me it looks like you lost a word between Mage and Helper somewhere, as usually Mage helper identifiers are s/t like Mage_Core_Helper_Data.

    I'd check the <helpers> sections of my /etc/config.xml files for wrong definitions first.

    Other than that I'd probably try to get a debug trace inside the Varien_Autoload::autoload method.

    I'd lookout for patterns in the parameter $class which could result in s/t like Mage__Helper_Data, e.g. occurences where $class contains spaces or double underscores:

    public function autoload($class)
    {
    
        try {
            if (strpos($class, ' ') !== false || strpos($class, '__') !== false) {
                throw new Exception('fishy');
            }
        }
        catch (Exception $e) {
            var_dump($class, $e->getTraceAsString());
            die('stop');
        }
    
        // original method code starts here
        // :
    
    }
    
    评论

报告相同问题?

悬赏问题

  • ¥15 用hfss做微带贴片阵列天线的时候分析设置有问题
  • ¥50 我撰写的python爬虫爬不了 要爬的网址有反爬机制
  • ¥15 Centos / PETSc / PETGEM
  • ¥15 centos7.9 IPv6端口telnet和端口监控问题
  • ¥120 计算机网络的新校区组网设计
  • ¥20 完全没有学习过GAN,看了CSDN的一篇文章,里面有代码但是完全不知道如何操作
  • ¥15 使用ue5插件narrative时如何切换关卡也保存叙事任务记录
  • ¥20 海浪数据 南海地区海况数据,波浪数据
  • ¥20 软件测试决策法疑问求解答
  • ¥15 win11 23H2删除推荐的项目,支持注册表等