Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

404 error in Custom Magento configuration in admin
 
Braytee
Jr. Member
 
Total Posts:  9
Joined:  2009-12-01
 

Hi

I’ve setup the system.xml file to manage the related custom report in configuration fields.

The menu entry shows up, but when I click it, a 404 error page is shown instead of the expected configuration fields list.

Can you see any errors in my code?
Config.xml

<?xml version="1.0"?>
<config>
    <
modules>
        <
Wcl_ReportNewOrders>
            <
version>0.1.0</version>
        </
Wcl_ReportNewOrders>
    </
modules>
    <
admin>
        <
routers>
             
            <
reportneworders>
                <use>
admin</use>
                <
args>
                    <
module>Wcl_ReportNewOrders</module>
                    <
frontName>reportneworders</frontName>
                </
args>
            </
reportneworders>
        </
routers>
    </
admin>
    <
adminhtml>
        <
menu>
            <
report>
                <
children>
                    <
reportneworders translate="title" module="reportneworders">
                         
                        <
title>LEC Monthly Statements</title
                       
                        <
action>reportneworders/adminhtml_reportneworders</action>
                    </
reportneworders>
                </
children>
            </
report>
        </
menu>
        <
acl>
            <
resources>
                <
all>
                    <
title>Allow Everything</title>
                </
all>
                <
admin>
                    <
children>
                        <
report>
                            <
children
                                <
reportneworders translate="title" module="reportneworders">
                                   
                                    <
title>New Orders Report</title>
                                    <
action>reportneworders/adminhtml_reportneworders</action>
                                </
reportneworders>
                            </
children>
                        </
report>
                    </
children>
                </
admin>
            </
resources>
        </
acl>
        <
layout>
            <
updates>
                <
reportneworders>
                    <
file>wcl_reportneworders.xml</file>
                </
reportneworders>
            </
updates>
        </
layout>
    </
adminhtml>
    <global>
        <
models>
            <
reportneworders>
                <class>
Wcl_ReportNewOrders_Model</class>
                <
resourceModel>reportneworders</resourceModel>
            </
reportneworders>
        </
models>
        <
resources>
            <
reportneworders_setup>
                <
setup>
                    <
module>Wcl_ReportNewOrders</module>
                </
setup>
                <
connection>
                    <use>
core_setup</use>
                </
connection>
            </
reportneworders_setup>
            <
reportneworders_write>
                <
connection>
                    <use>
core_write</use>
                </
connection>
            </
reportneworders_write>
            <
reportneworders_read>
                <
connection>
                    <use>
core_read</use>
                </
connection>
            </
reportneworders_read>
        </
resources>
        <
blocks>
            <
reportneworders>
                <class>
Wcl_ReportNewOrders_Block</class>
            </
reportneworders>
        </
blocks>
        <
helpers>
            <
reportneworders>
                <class>
Wcl_ReportNewOrders_Helper</class>
            </
reportneworders>
        </
helpers>
    </global>
</
config>
system.xml
<?xml version="1.0"?>
<config>
    <
sections>
    <
ahblecreports translate="label" module="reportneworders">
      <
label>LEC Reports Config</label>
      <
tab>general</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>
        <!-- New 
groups go here -->
        <
lecmessages translate="label" module="reportneworders">
          <
label>Emails</label>
          <
frontend_type>text</frontend_type>
          <
sort_order>98</sort_order>
          <
show_in_default>1</show_in_default>
          <
show_in_website>1</show_in_website>
          <
show_in_store>1</show_in_store>
          <
fields>
          <
lecfields translate="label comment">
              <
label>Send LEC reports to</label>
              <
frontend_type>text</frontend_type>
              <
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>
            </
lecfields>
          </
fields>
        </
lecmessages>
      </
groups>  
    </
ahblecreports>
  </
sections>
</
config>
adminthtml.xml
<?xml version="1.0"?>
<config>
  <
acl>
    <
resources>
      <
all>
        <
title>Allow Everything</title>
      </
all>
      <
admin>
        <
children>
          <
system>
            <
children>
              <
config>
                <
children>
                  <
ahblecreports translate="title">
                    <
title>An Example Section</title>
                    <
sort_order>100</sort_order>
                  </
ahblecreports>
                </
children>
              </
config>
            </
children>
          </
system>
        </
children>
      </
admin>
    </
resources>
  </
acl>
</
config>
 
Magento Community Magento Community
Magento Community
Magento Community
 
Siggi_Schmitz
Enthusiast
 
Avatar
Total Posts:  811
Joined:  2011-07-03
 

You have to logout and login again in the admin panel, because the ACL`s will only load at admin login and without ACL`s there`s a 404 error.

 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top