1

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

<?xml version="1.0"?>
<config>
     <tabs>
        <dateconfig translate="label" module="date">
            <label>Irs Extensions</label>
            <sort_order>401</sort_order>
        </dateconfig>
    </tabs>
    <sections>
        <dateoptions translate="label" module="date">
            <label>Date Hellooworld options</label>
            <tab>dateconfig</tab>
            <frontend_type>text</frontend_type>
            <sort_order>1000</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>
            <groups>
                <message translate="label">
                    <label>Date Demo Config File</label>
                    <frontend_type>text</frontend_type> 
                    <sort_order>1</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>
                </message>
            </groups>
        </dateoptions>

    </sections>

</config>

the url of my section is:

http://127.0.0.1/karthi/mage1924/index.php/admin/system_config/edit/section/dateoptions/

I tried Below Post and googled lot but I could not resolve this issue.

404 not found error while creating custom group and fields in system configuration

But, When i added this below lines of coding it gets successfully added in a new group in the general Tab called “Example of Adding a Group”.

        <general>
            <groups>
                <example>
                    <label>Example of Adding a Group</label>
                    <frontend_type>text</frontend_type>
                    <sort_order>1</sort_order>
                    <show_in_default>1</show_in_default>
                    <show_in_website>1</show_in_website>
                    <show_in_store>1</show_in_store>                    
                </example>
            </groups>
        </general>

Below my config.xml file

<?xml version="1.0"?>
<config>
    <modules>
        <Irs_Date>
            <version>1.0.0</version>
        </Irs_Date>
    </modules>
        <admin>
            <routers>
                <date>
                    <use>admin</use>
                 <args>
                    <module>Irs_Date</module>
                    <frontName>admindate</frontName>
                 </args>
                </date>
            </routers>
         </admin>
    <global>
        <helpers>
            <date>
                <class>Irs_Date_Helper</class>
            </date>
        </helpers>
        <blocks>
            <date>
                <class>Irs_Date_Block</class>
            </date>
        </blocks>
        <resources>
            <date_write>
                <connection>
                    <use>core_write</use>
                </connection>
            </date_write>
        </resources>
    </global>
</config>

This is adminhtml.xml

<config>
    <acl>
        <resources>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <date translate="title" module="date">
                                        <title>date Section</title>
                                        <sort_order>999</sort_order>
                                    </date>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
</config>
  • what you have tried ? have you added acl in adminhtml.xml OR config.xml ? – Minesh Patel Apr 18 '16 at 9:49
  • then logout and re-login and check – Minesh Patel Apr 18 '16 at 9:50
  • i have added acl in adminhtml.xml, but none worked, flushed magento cache and done login logout, it shows 404 error page not found – karthickeyan Apr 18 '16 at 9:56
  • @MineshPatel, 2 what am i missing? – karthickeyan Apr 18 '16 at 10:07
  • anybody can help me to slove this issue? – karthickeyan Apr 18 '16 at 10:19
0

I looked following blog, which helped me solving this issue, thanks to alanstorm for writing an awesome blog

http://alanstorm.com/custom_magento_system_configuration

Solved my 404 Error issue. Seems like it was an ACL related error. So I rewrote my acl part carefully.

Old Adminhtml.xml

 <config>
          <acl>
                <resources>
                    <admin>
                        <children>
                            <system>
                                <children>
                                    <config>
                                        <children>
                                            <date_options translate="title" module="date">
                                                <title>date Section</title>
                                                <sort_order>999</sort_order>
                                            </date_options>
                                        </children>
                                    </config>
                                </children>
                            </system>
                        </children>
                    </admin>
                </resources>
            </acl>
    </config>

updated new adminhtml.xml

<config>
          <acl>
                <resources>
                    <admin>
                        <children>
                            <system>
                                <children>
                                    <config>
                                        <children>
                                            <date_options translate="title" module="date">
                                                <title>date Section</title>
                                                <sort_order>999</sort_order>
                                            </date_options>
                                        </children>
                                    </config>
                                </children>
                            </system>
                        </children>
                    </admin>
                </resources>
            </acl>
    </config>

It should be date_options instead of date

  • i am new to stackexchange , i really liked about stackexchage , hereafter going to use continuously. thanks to alanstorm, – karthickeyan Apr 18 '16 at 10:44

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.