尝试访问配置面板时出现 Magento system.xml 和 404 错误 [英] Magento system.xml and 404 error when trying to access the configuration panel

查看:29
本文介绍了尝试访问配置面板时出现 Magento system.xml 和 404 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为我的自定义模块实施一些配置设置.我设法在左侧导航栏中添加了一个选项卡和一个部分.但是当我想打开一个部分时,我得到一个没有任何进一步信息的 404 错误页面.

I'm trying to implement some configuration settings for my custom module. I've managed to add a tab and a section in the left navigation bar. But when I want to open a section I get a 404 error page without any further information.

到目前为止,我已经尝试了任何方法来让它工作......阅读博客、示例等,但我找不到错误.也许你们中的某个人可以向我解释我做错了什么.

So far, I've tried anything to get it working.. reading blogs, examples etc. but I can't find the error. Maybe someone of you can explain me what I'm doing wrong.

我的adminhtml.xml:

<?xml version="1.0" ?>
<config>
    <resources>
        <admin>
            <children>
                <system>
                    <children>
                        <config>
                            <children>
                                <tempest_section translate="title" module="Tempest">
                                    <title>Tempest</title>
                                </tempest_section>
                            </children>
                        </config>
                    </children>
                </system>
            </children>
        </admin>
    </resources>
</config>

我的config.xml:

<?xml version="1.0"?>

<config>
    <modules>
        <Polyvision_Tempest>
            <version>0.1.0</version>
        </Polyvision_Tempest>
    </modules>


    <global>
        <helpers>
            <Tempest>
                <class>Polyvision_Tempest_Helper</class>
            </Tempest>  
        </helpers>
    </global>        

    <admin>
        <routers>
            <adminhtml>
                <args>
                    <modules>
                        <tempest before="Mage_Adminhtml">Polyvision_Tempest_Adminhtml</tempest>
                    </modules>
                </args>
            </adminhtml>
        </routers>
    </admin>


    <adminhtml>
        <menu>
            <menu1 translate="title" module="Tempest">
                <title>polyvision</title>
                <sort_order>60</sort_order>
                <children>
                    <menuitem1 module="Tempest">
                        <title>Tempest - Export</title>
                        <action>adminhtml/tempest_main</action>
                    </menuitem1>
                </children>                
            </menu1>
        </menu>
    </adminhtml>    

    <default>
        <tempest>
            <settings>
                <export_directory>/tmp/</export_directory>
            </settings>
        </tempest>
    </default>
</config>

我的system.xml:

<?xml version="1.0" ?>
<config>
    <tabs>
        <polyvision module="Tempest" translate="label">
            <label>polyvision</label>
            <sort_order>100</sort_order>
        </polyvision>
    </tabs>
    <sections>
        <tempest_section module="Tempest" translate="label">
            <label>Tempest-Einstellungen</label>
            <sort_order>200</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>
            <tab>polyvision</tab>
            <groups>
                <settings translate="label">
                    <label>Settings</label>
                    <comment></comment>
                    <sort_order>10</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                    <fields>
                        <export_directory translate="label tooltip comment">
                            <label>My Custom Field</label>
                            <comment>Some comment about my field</comment>
                            <tooltip>Field ToolTip</tooltip>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        <frontend_input>text</frontend_input>
                        <source_model>adminhtml/system_config_text</source_model>
                    </export_directory>
                </fields>
            </settings>
        </groups>
    </tempest_section>
</sections>

好吧,我的模块本身可以轻松运行.只有管​​理设置不起作用:/

Well, my module itself works without hassles. Only the admin settings are not working :/

推荐答案

如果是 Admin Console chrome 中的 404,那么您的问题是缺少 ACL 角色.阅读这篇关于如何设置的文章.(自链接)

If it's the 404 in the Admin Console chrome, then your problem is a missing ACL role. Read this article on how to set one up. (self link)

此外,在设置您的 ACL 角色后,您需要清除您的 Magento 会话.Magento 会缓存会话中的特定角色,新会话不会自动添加到具有超级用户角色的用户的缓存中.

Also, after setting up your ACL role, you'll need to clear out your Magento sessions. Magento caches specific roles in the session, and new sessions won't be automatically added to the cache of users with the super user role.

这篇关于尝试访问配置面板时出现 Magento system.xml 和 404 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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