14

I am trying to create a group and some fields for my custom section under custom tab

Tab and section is getting created.But when i click on the section in the content area it shows 404 not found error

my system.xml file is as follows

<config>
    <tabs>
        <!--node is just an identifier-->
        <animala translate="label" module="training_animal">
            <label>Training</label>
            <sort_order>1</sort_order>
        </animala>
    </tabs>
    <sections>
        <animals translate="label" module="training_animal">
            <class>seperator-top</class>
            <label>Training</label>
            <!--node vlaue should match the tabs node name-->
            <tab>animala</tab>
            <frontend_type>text</frontend_type>
            <sort_order>100</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>

            <groups>
                <training_animal_group translate="label">
                    <label>My Custom Group</label>
                    <comment>Some comment about my group</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>
                        <training_animal_field 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_type>text</frontend_type>
                        </training_animal_field>
                    </fields>
                </training_animal_group>
            </groups>
        </animals>
    </sections>
</config>

The url of my section is

http://localhost/mage2/index.php/admin/system_config/edit/section/animal/

module config.xml

<modules>
    <Training_Animal>
        <version>0.2.0</version>
    </Training_Animal>
</modules>

Training_Animal_Block

    <training_animal>
        <class>Training_Animal_Helper</class>
    </training_animal>

</helpers>

  • I would like to thank everyone involved in this thread for helping me immensely :) – siliconrockstar Mar 20 '14 at 18:45
31

You should also set your ACL resources for the custom system config group. I assume you are using Magento > 1.5. In your adminhtml.xml (app/code/{codepool}/Training/Animal/etc/adminhtml.xml):

<config>
    <acl>
        <resources>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <animals translate="title" module="training_animal">
                                        <title>Animals</title>
                                        <sort_order>999</sort_order>
                                    </animals>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
</config>

In earlier version of Magento this information was stored in the config.xml.

  • 6
    Also, after you add this file, log out and log in again, to let Magento refresh ACL rules. – fmrng Apr 25 '13 at 14:12
  • 2
    Actually i had set my acl resource. but i did not logout and login. Its working fine now. Thanks – zamil Apr 26 '13 at 5:17
  • Thanks fmrng. This helped me. Earlier I was missing with some of the tags in acl resources... – Pavan Kumar Apr 11 '14 at 7:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.