Yehia A.Salam
Yehia A.Salam

Reputation: 2078

Custom Magento Extension Configuration 404

I came accross a lot of people facing the system issue with the 404 error on the configuration page, but i literally read all of them, tried every solution, and im sadly still stuck.

So I have a magento extension, the configuration entry appears in the configuration tab on the left, and yet when clicking on it, i'm always faced with a 404 error, here are the xmls:

P.S. On a completely seperate note, what seems commpletely unrelated, could be related: I'm getting this error Fatal error: Class 'Mage_Appfactory_Basic_Helper_Data' not found in C:\Development\stage\grantorino-appfactory-ab\magento\app\Mage.php on line 547 when i navigate to the System -> Permissions -> Roles -> Administrators, everything else works just fine, I have a Data.php extending from class AppFactory_Basic_Helper_Data extends Mage_Core_Helper_Abstract {

config.xml

<?xml version="1.0"?>


<config>
  <modules>
    <AppFactory_Basic>
      <version>1.0</version>
    </AppFactory_Basic>
  </modules>

  <frontend>
    <routers>
      <basic>
            <use>standard</use>
            <args>
                <module>AppFactory_Basic</module>
                <frontName>basic</frontName>
            </args>
       </basic>
    </routers>
    <!-- <layout>
        <updates>
            <murad_restapi>
                <file>murad_restapi.xml</file>
            </murad_restapi>
        </updates>
    </layout> -->
  </frontend>

  <global>
    <helpers>
      <!--<googleanalytic>
        <class>AppFactory_GoogleAnalytic_Helper</class>
      </googleanalytic>-->
      <basic>
        <class>AppFactory_Basic_Helper</class>
      </basic>

    </helpers>

    <models>
      <basic>
        <class>AppFactory_Basic_Model</class>
      </basic>
    </models>

    <resources>
        <basic_setup>
            <setup>
                <module>AppFactory_Basic</module>
                <class>Mage_Customer_Model_Entity_Setup</class>
            </setup>
        </basic_setup>
        <basic_write>
            <connection>
                <use>core_write</use>
            </connection>
        </basic_write>
        <basic_read>
            <connection>
                <use>core_read</use>
            </connection>
        </basic_read>        
    </resources>

  </global>



    <default>
        <basic>
            <view>
                <enabled>1</enabled>
                <google_analytics></google_analytics>
            </view>
        </basic>
    </default>

</config> 

adminhtml.xml

<?xml version="1.0"?>

<config>
    <menu>
         <basic translate="title" module="basic">
            <title>App Factory</title>
            <sort_order>300</sort_order>
                 <children>
                    <manage translate="title" module="basic">
                        <title>Whatever</title>
                        <action>adminhtml/push</action>
                        <sort_order>1</sort_order>
                    </manage>
                </children>       
         </basic>
    </menu>
    <acl>
        <resources>
            <admin>
                <children>
                    <system>
                        <children>
                            <config>
                                <children>
                                    <appfactory_basic translate="title" module="appfactory_basic">
                                        <title>App Factory Core Configurations</title>
                                    </appfactory_basic>
                                </children>
                            </config>
                        </children>
                    </system>
                </children>
            </admin>
        </resources>
    </acl>  
</config>

system.xml

<?xml version="1.0"?>

<config>
    <tabs>
        <appfactory>
            <label>App Factory</label>
            <sort_order>1</sort_order>
        </appfactory>
    </tabs>
    <sections>     
        <basic>
            <class>separator-top</class>
            <label>App Factory</label>
            <tab>appfactory</tab>
            <frontend_type>text</frontend_type>
            <sort_order>2</sort_order>
            <show_in_default>1</show_in_default>
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>
        <groups>
            <view translate="label">
                <label>General</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>
                <expanded>1</expanded>
                <fields>
                    <enabled translate="label">
                        <label>Enable Shopping Cart</label>
                        <frontend_type>select</frontend_type>
                        <source_model>adminhtml/system_config_source_yesno</source_model>
                        <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>
                    </enabled>                    
                    <google_analytics translate="label">
                        <label>Google Analytics ID</label>
                        <comment>Enter your universal Google Analytics ID</comment>
                        <sort_order>30</sort_order>
                        <depends><enabled>1</enabled></depends>
                        <show_in_default>1</show_in_default>
                        <show_in_website>1</show_in_website>
                        <show_in_store>1</show_in_store>
                    </google_analytics>
                </fields>
            </view>
        </groups>

    </basic>
</sections>

Upvotes: 0

Views: 108

Answers (2)

Sveta Oksen
Sveta Oksen

Reputation: 401

This part seems to be wrong:

<acl>
    <resources>
        <admin>
            <children>
                <system>
                    <children>
                        <config>
                            <children>
                                <appfactory_basic translate="title" module="appfactory_basic">
                                    <title>App Factory Core Configurations</title>
                                </appfactory_basic>
                            </children>
                        </config>
                    </children>
                </system>
            </children>
        </admin>
    </resources>
</acl> 

The tag <appfactory_basic> is wrong - it should be either <appfactory> or <basic> (Try both, I'm not sure which one of them is the correct one)

Upvotes: 1

Amit Bera
Amit Bera

Reputation: 7611

Yehia A.Salam,i have checked your issue in system.xml where <config> is not close. enter image description here

Upvotes: 0

Related Questions