【发布时间】: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。套管是正确的。