未找到Magento自定义管理模块404 [英] Magento custom admin module 404 not found

查看:70
本文介绍了未找到Magento自定义管理模块404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图为magento admin部分创建一个新模块.我已经看到许多有关此问题的主题,但没有一个解决了我的问题.

I have tried to create a new module for the magento admin section. I have seen many topics on this problem but none of them solved my issue.

我已经在app/etc/modules/中创建了一个名为Company_CustomList.xml的文件

I have created a file in app/etc/modules/ named Company_CustomList.xml

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

然后在app/code/local/Company/CustomList中,我创建了以下文件:

Then in app/code/local/Company/CustomList I have created the following files:

app/code/local/Company/CustomList/Block/List.php

app/code/local/Company/CustomList/Block/List.php

<?php
class Company_CustomList_Block_List extends Mage_Core_Block_Template
{
  // necessary methods
}
?>

app/code/local/Company/controllers/Adminhtml/IndexController.php

app/code/local/Company/controllers/Adminhtml/IndexController.php

<?php
class Company_CustomList_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action
{
    public function indexAction()
    {
        $this->loadLayout();
        $this->renderLayout();
    }


}
?>

app/code/local/Company/etc/config.xml

app/code/local/Company/etc/config.xml

<?xml version="1.0"?>
<config>
    <modules>
        <Company_CustomList>
            <version>0.1.0</version>
        </Company_CustomList>
    </modules>
    <adminhtml>
        <acl>
            <resources>
                <admin>
                    <children>
                        <customlist>
                            <title>Custom list</title>
                            <children>
                                <example translate="title" module="customlist">
                                    <title>Index</title>
                                </example>
                            </children>
                        </customlist>
                    </children>
                </admin>
            </resources>
        </acl>
    </adminhtml>
    <global>
        <helpers>
            <customlist>
                <class>Company_CustomList_Helper</class>
            </customlist>
        </helpers>
    </global>
</config>

app/code/local/Company/etc/adminhtml.xml

app/code/local/Company/etc/adminhtml.xml

<?xml version="1.0"?>
<config>
    <menu>
        <customlist translate="title" module="customlist">
            <title>Custom list</title>
            <sort_order>15</sort_order>
            <children>
                <example translate="title" module="customlist">
                    <title>Index</title>
                    <sort_order>1</sort_order>
                    <action>adminhtml/customlist/index</action>
                </example>
            </children>
        </customlist>
    </menu>
    <acl>
        <resources>
            <admin>
                <children>
                    <customlist translate="title" module="customlist">
                        <title>Custom list</title>
                        <sort_order>15</sort_order>
                        <children>
                            <example translate="title" module="customlist">
                                <title>Index</title>
                                <sort_order>1</sort_order>
                                <action>adminhtml/customlist/index</action>
                            </example>
                        </children>
                    </customlist>
                </children>
            </admin>
        </resources>
    </acl>
</config>

app/code/local/Company/Helper/Data.php

app/code/local/Company/Helper/Data.php

<?php
class Company_CustomList_Helper_Data extends Mage_Core_Helper_Abstract {

}

?>

问题可能来自我的ACL ...但是我真的找不到解决方法.

The problem might come from my ACL... but I really can't find how to fix it.

谢谢

推荐答案

在这里建议您制作可以使用模块创建器的新模块,并且如果您想利用自己的时间,可以避免类似的错误.

Here is suggesting you to make new module you can use module creator and you can avoid error like this if you want to utilize your time.

请使用以下链接在线生成模块创建者

Please use below link for online generation of module creator

或者您也可以从各个站点下载模块创建者,只需进行搜索即可.

or you can also download module creator from various sites just search it out.

还有一件事,如果再次发生相同的错误,请使用magento清除缓存以及浏览器缓存

And one more thing if same error will generate again please clear your cache with magento as well as your browser caching also

祝你有美好的一天.

让我知道我能否为您提供更多帮助.

Let me know if i can help you more.

这篇关于未找到Magento自定义管理模块404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆