Magento模块管理控制器返回404错误
我正在按照以下步骤创建简单报告模块。当我尝试打开 我收到404错误。任何帮助都将不胜感激。以下是我所做的 app/etc/modules/Package_Custom.xmlMagento模块管理控制器返回404错误,magento,Magento,我正在按照以下步骤创建简单报告模块。当我尝试打开 我收到404错误。任何帮助都将不胜感激。以下是我所做的 app/etc/modules/Package_Custom.xml <?xml version="1.0"?> <config> <modules> <Package_Custom> <active>true</active> <codePo
<?xml version="1.0"?>
<config>
<modules>
<Package_Custom>
<active>true</active>
<codePool>local</codePool>
</Package_Custom>
</modules>
</config>
app/code/local/Package/Custom/controllers/Adminhtml/Report/ExampleController.php
<?php
class Package_Custom_Adminhtml_Report_ExampleController extends Mage_Adminhtml_Controller_Action
{
public function _initAction()
{
$this->loadLayout()->_addBreadcrumb(Mage::helper('custom')->__('Custom'),Mage::helper('custom')->__('Custom'));
return $this;
}
}
?>
app/code/local/Package/Custom/etc/adminhtml.xml
<?xml version="1.0"?>
<config>
<menu>
<custom translate="title" module="custom">
<title>Custom</title>
<sort_order>15</sort_order>
<children>
<simple translate="title" module="custom">
<title>Simple Report<</title>
<sort_order>1</sort_order>
<action>adminhtml/report_example/simple</action>
</simple>
</children>
</custom>
</menu>
app/code/local/Package/Custom/etc/config.xml
<?xml version="1.0"?>
<config>
<modules>
<Package_Custom>
<version>1.0.0</version>
</Package_Custom>
</modules>
<admin>
<routers>
<adminhtml>
<args>
<modules>
<custom before="Mage_Adminhtml">Package_Custom_Adminhtml</custom>
</modules>
</args>
</adminhtml>
</routers>
</admin>
</config>
<title>Simple Report<</title>
您必须在adminhtml.xml中配置acl部分
解决了这个问题。在config.xml中
<?xml version="1.0"?>
<config>
<modules>
<Package_Custom>
<version>1.0.0</version>
</Package_Custom>
</modules>
<admin>
<routers>
<adminhtml>
<args>
<modules>
<custom before="Mage_Adminhtml">Package_Custom_Adminhtml</custom>
</modules>
</args>
</adminhtml>
</routers>
</admin>
</config>
<title>Simple Report<</title>
应该是
<title>Simple Report</title>