【问题标题】:Magento not loading helper on productionMagento 没有在生产中加载助手
【发布时间】:2015-05-13 03:57:19
【问题描述】:

我正在运行一个 Magento 自定义模块(仅用于单个帮助程序),它在本地加载良好,但在生产中抛出此错误:

Warning: include(Mage/Webviews/Helper/Data.php): failed to open stream: No such file or directory  in /media/ephemeral0/vep_mage-primaries-prod/web/lib/Varien/Autoload.php on line 93

我检查了后端高级模块输出,但该模块未在此处列出,这意味着 Magento 没有选择它。在我的开发机器上它加载完美,一旦我部署模块没有被加载,我清除了缓存(即使使用 rm -rf *)和 php -f shell/compiler.php -- 状态(已禁用)。 Magento 日志似乎是空的。

这可能是什么原因? 还有其他隐藏缓存吗?如果模块未加载,magento 怎么不记录任何内容?

谢谢你的帮助,我很绝望。

编辑添加的 config.xml(编辑的公司名称)

<?xml version="1.0"?>
<config>
    <modules>
        <Redacted_Webviews>
            <version>1.0.0</version>
        </Redacted_Webviews>
    </modules>

    <global>
        <helpers>
            <webviews>
                <class>Redacted_Webviews_Helper</class>
            </webviews>
        </helpers>
    </global>

</config>

【问题讨论】:

  • 显示 config.xml 代码..
  • 添加了 config.xml 代码
  • 配置什么? local.xml 还是别的什么?
  • Redacted_Webviews.xml 在你的 app/etc/module/ 这个文件中?模块配置文件

标签: php magento


【解决方案1】:

完美运行

app/etc/module/Redacted_Webviews.xml 配置文件

<?xml version="1.0"?>
<config>
  <modules>
    <Redacted_Webviews>
      <active>true</active>
      <codePool>local</codePool>
      <version>0.1.0</version>
    </Redacted_Webviews>
  </modules>
</config>

你的配置文件app/code/local/Redacted/Webviews/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Redacted_Webviews>
            <version>1.0.0</version>
        </Redacted_Webviews>
    </modules>

    <global>
        <helpers>
            <webviews>
                <class>Redacted_Webviews_Helper</class>
            </webviews>
        </helpers>
    </global>

</config>

您的助手数据app/code/local/Redacted/Webviews/Helper/Data.php

<?php

class Redacted_Webviews_Helper_Data extends Mage_Core_Helper_Abstract
{



}

【讨论】:

  • 我知道它运行良好,本地运行,是现场站点的问题。数据库或其他地方是否隐藏了其他缓存?
  • 它也可以在现场工作。刚刚禁用缓存并安装您的模块。
猜你喜欢
  • 2018-06-19
  • 2020-10-04
  • 1970-01-01
  • 1970-01-01
  • 2016-05-30
  • 2015-05-20
  • 2021-05-20
  • 1970-01-01
  • 2012-03-10
相关资源
最近更新 更多