0

I have created custom magento configuration. When I click on tab I am getting 404. Can anyone tell me why I am getting that

My files are shown below

system.xml

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <tabs>
        <netbank translate="label" module="netbank">
            <label>Netbank</label>
            <sort_order>1</sort_order>
        </netbank>
    </tabs>
    <sections>
        <banking translate="label" module="netbank">
            <label>Netbanking Options</label>
            <tab>netbank</tab>
            <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>
            <groups>
                <net_banking translate="label" module="netbank">
                    <label>SMS sending list</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>
                    <fields>
                        <bank_select translate="label">
                                <label>Choose top five banks</label>
                                <frontend_type>select</frontend_type>
                                <source_model>netbank/system_config_source_show</source_model>
                                <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>
                        </bank_select>
                    </fields>
                </net_banking>
            </groups>
        </banking>
    </sections>
</config>

adminhtml.xml

<adminhtml>
    <acl>
        <resources>
            <all>
                <title>Allow Everything</title>
            </all>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <netbank>
                                        <title>Netbanking</title>
                                    </netbank>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>
</adminhtml>

config.xml

<?xml version="1.0" ?>
<config>
    <modules>
        <Iksula_Netbank>
            <version>0.1.0</version> <!-- the version of module resources -->
        </Iksula_Netbank>
    </modules>
    <global> <!-- global scope, also known as the default configuration area -->
         <models> <!-- definitions of the module models namespaces -->
             <netbank>
                 <class>Iksula_Netbank_Model</class>
             </netbank>
         </models>
         <blocks> <!-- a defintion of the module blocks namespace -->
             <netbank>
                 <class>Iksula_Netbank_Block</class>
             </netbank>
         </blocks>
         <helpers> <!-- a definition of the module helpers namespace -->
             <netbank>
                 <class>Iksula_Netbank_Helper</class>
             </netbank>
         </helpers>
    </global>
    <frontend>
        <routers>
            <netbank>
                <use>standard</use>
                  <args>
                    <module>Iksula_Netbank</module>
                    <frontName>netbank</frontName>
                  </args>
            </netbank>
        </routers>
    </frontend>
</config>

Can anyone tell me how can I solve this

Sattu
  • 139
  • 1
  • 8

2 Answers2

3

This is a common problem. I also face such a problem.In my case i did logout & then re login & that works for me.

Alternatively you can flush the cache & all.

  • The permissions for the backend are loaded only once
  • when the admin logs in. After that they are kept in the session.
  • If you create a new admin section or config section the current user does not have a permission for that so he cannot access it.
  • This is solved by regenerating the session (logout and login).
  • You can find here a possible workaround so you don't have to logout, but it's not worth it for performance reasons.
  • Is just there as a POC
Community
  • 1
  • 1
Bhavesh Gadoya
  • 196
  • 2
  • 13
  • A little more explanation might help out the fellow programmers to understand how it works. – Nagama Inamdar May 07 '14 at 10:09
  • 1
    @Infinity, I can explain that. The permissions for the backend are loaded only once - when the admin logs in. After that they are kept in the session. If you create a new admin section or config section the current user does not have a permission for that so he cannot access it. This is solved by regenerating the session (logout and login). You can find here a possible workaround so you don't have to logout, but it's not worth it for performance reasons. Is just there as a POC. http://magento.stackexchange.com/a/13930/146 – Marius May 07 '14 at 10:41
  • That's the perefect technical answer @Marius – Bhavesh Gadoya May 07 '14 at 10:49
  • Ok nice.Edited the answer to for further clarification of budding programmers. – Nagama Inamdar May 07 '14 at 11:08
0

I found the solution.

The section name should be same as tabs. I have used the tab name as netbank and section name as banking. I have now changed banking to netbank. Its working fine now. Thankyou guys.

Sattu
  • 139
  • 1
  • 8
  • 1
    This is not true, but it is close. The section name has to be equal to the ACL entry, where you have used `netbank` - this is the reason it worked when you changed your section to `netbank`, too. The name of the tab is irrelevant. – Imanuel Jan 03 '17 at 19:47