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

Admin configuration access denied and blank page for custom module
 
tom13
Jr. Member
 
Total Posts:  4
Joined:  2008-12-12
 

Hi,
I’m trying to create a small custom module with some configuration options. If I add a section to an existing category (e.g. general > web), it works fine. If I try to create my own category (e.g. general > new) however, it doesn’t work.
If I disable the cache, then log out and in again, I get an “access denied” error. If I refresh the cache, then log out and in again, I get a blank page.

My system.xml:

<?xml version="1.0"?>
<config>
    <
sections>
        <
advanced_reports translate="label" module="reports">
            <
label>Advanced Reports</label>
            <
tab>sales</tab>
            <
frontend_type>text</frontend_type>
            <
sort_order>800</sort_order>
            <
show_in_default>1</show_in_default>
            <
show_in_website>1</show_in_website>
            <
show_in_store>1</show_in_store>
            <
groups>
                <
columns translate="label">
                    <
label>Column Options</label>
                    <
frontend_type>text</frontend_type>
                    <
show_in_default>1</show_in_default>
                    <
show_in_website>1</show_in_website>
                    <
show_in_store>1</show_in_store>
                    <
fields>
                        <
extra_columns translate="label">
                            <
label>Extra Columns</label>
                            <
frontend_type>text</frontend_type>
                            <
show_in_default>1</show_in_default>
                            <
show_in_website>1</show_in_website>
                            <
show_in_store>1</show_in_store>
                            <
comment><![CDATA[
                                comma seperated
                            ]]
></comment>
                        </
extra_columns>
                    </
fields>
                </
columns>
            </
groups>
        </
advanced_reports>
    </
sections>
</
config>

Anyone who can point me in the right direction? I can’t find anything in the forums or wiki pages.

 
Magento Community Magento Community
Magento Community
Magento Community
 
PandaWebStudio
Member
 
Avatar
Total Posts:  40
Joined:  2008-04-19
Amsterdam, Netherlands
 

Check your config.xml section for (replace modulename with the name of your module):

<admin>

        <
routers>

        <
modulename>

            <use>
admin</use>

            <
args>

                <
module>Namespace_Modulename</module>

                <
frontName>modulename</frontName>

            </
args>

        </
modulename>

        </
routers>

    </
admin>

<adminhtml>
<
acl>

            <
resources>

                <
all>

                    <
title>Allow Everything</title>

                </
all>

                <
admin>

                    <
children>
                        <
system>
                            <
children>
                            <
config>
                                <
children>
                                    <
modulename>
                                        <
title>some title</title>
                                    </
modulename>
                                </
children>
                            </
config>
                            </
children>
                        </
system>
                        </
children>

                </
admin>

            </
resources>

        </
acl>
</
adminhtml>

And system.xml

<config>    
    <
sections>
        <
modulename translate="label" module="modulename">
<!-- 
more lines here -->
</
modulename>
</
sections>
</
config>

Here are my config.xml and system.xml files for my module (app/code/local/Ab/Eticket)

File Attachments
config.xml  (File Size: 6KB - Downloads: 564)
system.xml  (File Size: 5KB - Downloads: 447)
 
Magento Community Magento Community
Magento Community
Magento Community
 
tom13
Jr. Member
 
Total Posts:  4
Joined:  2008-12-12
 

That didn’t fix it completely, but definately got me on the right track.
It seems I made an error in placing the configuration page itself under System > Configuration > Sales, but in the acl tree I placed it under Reports. Now that I’ve moved it to the Configuration > Sales section in the acl tree it works.
Thanks for the help!

 
Magento Community Magento Community
Magento Community
Magento Community
 
Stephan Hoyer
Jr. Member
 
Total Posts:  12
Joined:  2009-02-03
Leipzig
 

I have the same problem, althought i think all is right configured. Here are my configs:

config.xml

<admin>
        <
routers>
            <
example>
                <use>
admin</use>
                <
args>
                    <
module>XYZ_Example</module>
                    <
frontName>admin/example</frontName>
                </
args>
            </
example>
        </
routers>
    </
admin>
    <
adminhtml>
        <
acl>
            <
resources>
                <
all>
                    <
title>Allow Everything</title>
                </
all>
                <
admin>
                    <
children>
                        <
XYZ_Example>
                            <
title>Example Module</title>
                            <
sort_order>10</sort_order>
                        </
XYZ_Example>
                    </
children>
                </
admin>
            </
resources>
        </
acl>
        <
layout>
            <
updates>
                <
example>
                    <
file>example.xml</file>
                </
example>
            </
updates>
        </
layout>
    </
adminhtml>

system.xml

<?xml version="1.0"?>
<config>
    <
sections>
        <
example module="example">
            <
label>Example</label>
            <
tab>sales</tab>
            <
frontend_type>text</frontend_type>
            <
sort_order>305</sort_order>
            <
show_in_default>1</show_in_default>
            <
show_in_website>1</show_in_website>
            <
show_in_store>0</show_in_store>
        </
example>
    </
sections>
</
config>

In the System/Configuration it shows up correctly, but if I click on it, I get the access denied message, althought I have all privileges.

Anyone can help?

 
Magento Community Magento Community
Magento Community
Magento Community
 
xianFF0000
Jr. Member
 
Total Posts:  5
Joined:  2009-03-27
 

Same here, it works if I put the module within the “Payment Methods” <section> (for example), but when I create a new <section> I get Access Denied.  What are we missing?

 
Magento Community Magento Community
Magento Community
Magento Community
 
Dock05
Jr. Member
 
Avatar
Total Posts:  13
Joined:  2008-04-06
Zutphen, NL
 

I have this problem as well. It doesn’t occur when I explicitly set the custom permissions (under System->Permissions->Role) and select everything.

 
Magento Community Magento Community
Magento Community
Magento Community
 
Jason Lai
Jr. Member
 
Total Posts:  22
Joined:  2009-08-23
Hong Kong
 
Stephan Hoyer - 13 February 2009 04:39 AM

I have the same problem, althought i think all is right configured. Here are my configs:

config.xml

<admin>
        <
routers>
            <
example>
                <use>
admin</use>
                <
args>
                    <
module>XYZ_Example</module>
                    <
frontName>admin/example</frontName>
                </
args>
            </
example>
        </
routers>
    </
admin>
    <
adminhtml>
        <
acl>
            <
resources>
                <
all>
                    <
title>Allow Everything</title>
                </
all>
                <
admin>
                    <
children>
                        <
XYZ_Example>
                            <
title>Example Module</title>
                            <
sort_order>10</sort_order>
                        </
XYZ_Example>
                    </
children>
                </
admin>
            </
resources>
        </
acl>
        <
layout>
            <
updates>
                <
example>
                    <
file>example.xml</file>
                </
example>
            </
updates>
        </
layout>
    </
adminhtml>

system.xml
<?xml version="1.0"?>
<config>
    <
sections>
        <
example module="example">
            <
label>Example</label>
            <
tab>sales</tab>
            <
frontend_type>text</frontend_type>
            <
sort_order>305</sort_order>
            <
show_in_default>1</show_in_default>
            <
show_in_website>1</show_in_website>
            <
show_in_store>0</show_in_store>
        </
example>
    </
sections>
</
config>

In the System/Configuration it shows up correctly, but if I click on it, I get the access denied message, althought I have all privileges.

Anyone can help?

In system.xml, the newmodule is under <tab> Sales </tab>.  However, it seems that insufficient acl right is not set in config.xml.
Hope it can help.

 
Magento Community Magento Community
Magento Community
Magento Community
 
leevo
Jr. Member
 
Total Posts:  22
Joined:  2009-03-21
 

I hope this helps,

Go to System->Rights->Rules(role?) (hope that this is the right term, use dutch translation)

then open role->role sources and grant access to all.

save and now you should have access to your newly added extension.

greetings

 
Magento Community Magento Community
Magento Community
Magento Community
 
CreateStores
Jr. Member
 
Avatar
Total Posts:  7
Joined:  2010-02-17
 

grin And
0) after change config.xml with acl section
1) cache - reset
2) logout/login as admin

 
Magento Community Magento Community
Magento Community
Magento Community
 
chapagain
Sr. Member
 
Avatar
Total Posts:  202
Joined:  2009-07-19
 

Here is a proper description and solution for the Access denied issue in a custom Magento module

Access denied in Magento custom module

Hope it helps.

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