【问题标题】:Magento Module Working On Localhost But Not Live (Subdomain)Magento 模块在本地主机上工作,但不是实时(子域)
【发布时间】:2014-07-03 13:22:58
【问题描述】:

我在我的 MAMP localhost 上安装了 magento。网址是 localhost/httpdocs/。我创建了一个名为“quotation”的模块,它适用于 localhost,url:localhost/httpdocs/quotation。我创建的表单正确显示。在我们的测试域http://proac.ourdomain.com/quotation 我有一个 404 错误。数据库和代码相同(与 PHPSTORM 同步)

在测试域,报价模块显示404,未找到,但在本地工作。任何想法为什么会这样?

配置.xml

    <?xml version = "1.0"?>
<config>
    <modules>
        <No_Quotation>
            <version>0.0.1</version>
        </No_Quotation>
    </modules>
    <frontend>
        <routers>
            <quotation>
                <use>standard</use>
                <args>
                    <module>No_Quotation</module>
                    <frontName>quotation</frontName>
                </args>
            </quotation>
        </routers>
        <translate>
            <modules>
                <No_Quotation>
                    <files>
                        <default>Mage_Contacts.csv</default>
                    </files>
                </No_Quotation>
            </modules>
        </translate>
        <layout>
            <updates>
                <quotation>
                    <file>quotation.xml</file>
                </quotation>
            </updates>
        </layout>
    </frontend>
    <global>
        <resources>
            <quotation_setup>
                <setup>
                    <module>No_Quotation</module>
                </setup>
            </quotation_setup>
        </resources>
        <template>
            <email>
                <quotation_email_email_template translate="label" module="quotation">
                    <label>Quote Form</label>
                    <file>quotation_form.html</file>
                    <type>html</type>
                </quotation_email_email_template>
            </email>
        </template>
        <helpers>
            <quotation>
                <class>No_Quotation_Helper</class>
            </quotation>
        </helpers>
    </global>
    <adminhtml>
        <translate>
            <modules>
                <No_Quotation>
                    <files>
                        <default>No_Quotation.csv</default>
                    </files>
                </No_Quotation>
            </modules>
        </translate>
    </adminhtml>
    <default>
        <quotation>
            <quotation>
                <enabled>1</enabled>
            </quotation>>
            <email>
                <recipient_email><![CDATA["marcstevenplotz@gmail.com"]]></recipient_email>
                <sender_email_identity>custom2</sender_email_identity>
                <email_template>quotation_email_email_template</email_template>
            </email>
        </quotation>>
    </default>
</config>

模块.xml

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

【问题讨论】:

  • 它可能在您的控制器中,而不是配置文件中。路径逻辑是 // 并且总是尝试转储缓存文件夹。
  • 但是为什么它会在本地运行而不是在实时服务器上呢?
  • 可能是你使用大小写的方式,Linux和windows没有遵循相同的规则。看看sharpdotinc.com/mdost/2009/03/19/…Addtionaly:stackoverflow.com/questions/7429825/…检查你的服务器设置
  • 我使用的是 Mac、MAMP,而不是 Windows。套管是正确的。

标签: php xml .htaccess magento


【解决方案1】:

我希望这是 config.xml spacing issue 中的问题: 我看过你的,有some space below start&lt;?xml version = "1.0"?&gt;,所以删除这个空间

【讨论】:

  • 那是复制粘贴的,我查了一下,没有空格。
猜你喜欢
  • 2012-11-13
  • 2016-05-17
  • 1970-01-01
  • 2011-03-23
  • 2018-09-12
  • 1970-01-01
  • 2016-03-05
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多