The question:
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>
The Solutions:
Below are the methods you can try. The first solution is probably the best. Try others if the first one doesn’t work. Senior developers aren’t just copying/pasting – they read the methods carefully & apply them wisely to each case.
Method 1
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
.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0