0
votes

I have created a custom Magento module which all works fine when the config scope is set to Main Website.

However, If I switch the config scope to default config the config panel for my custom module disappears, I have no idea where this is specified in my config, which file is the scope of the module config set?

Main website:

enter image description here

Default config:

enter image description here

As you can see my custom config is missing on the deafult config scope.

Edit: Added system.xml

<?xml version="1.0"?>
<config>
    <tabs>
        <intilery translate="label" module="analytics">
            <label>Intilery Analytics</label>
            <sort_order>100</sort_order>
        </intilery>
    </tabs>

    <sections>
        <intilery translate="label" module="analytics">
            <label>Tracking Code</label>
            <tab>intilery</tab>
            <frontend_type>text</frontend_type>
            <sort_order>100</sort_order>

            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>

            <groups>
                <tracking translate="label" module="analytics">
                    <label>Tracking Code</label>
                    <frontend_type>text</frontend_type>
                    <expanded>1</expanded>
                    <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>
                    <fields>
                        <code translate="label">
                            <label>Account Code:</label>
                            <comment>Please enter your account code, you can find this under your settings.</comment>
                            <frontend_type>text</frontend_type>
                            <sort_order>20</sort_order>
                            <show_in_default>1</show_in_default>
                            <show_in_website>1</show_in_website>
                            <show_in_store>1</show_in_store>
                        </code>

                        <!-- New fields go here -->
                        <active translate="label comment">
                            <label>Enabled:</label>
                            <comment>Select whether or not Intilery tracking is enabled.</comment>
                            <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>
                        </active>
                       </fields>
                </tracking>
                <logging translate="label">
                    <label>Logging</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>
                        <enabled translate="label">
                            <label>Logging</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>
                    </fields>
                </logging>
            </groups>
        </intilery>
    </sections>
</config>
1
Can you update your question with your custom modules's system.xml file?Mukesh
@Muk Updated question.Chris Edwards
Check the answer and accept if it works for you.Mukesh

1 Answers

1
votes

You are missing <show_in_default>1</show_in_default> for your sections in your code.

Try following it should work for you.

<?xml version="1.0"?>
<config>
    <tabs>
        <intilery translate="label" module="analytics">
            <label>Intilery Analytics</label>
            <sort_order>100</sort_order>
        </intilery>
    </tabs>

    <sections>
        <intilery translate="label" module="analytics">
            <label>Tracking Code</label>
            <tab>intilery</tab>
            <frontend_type>text</frontend_type>
            <sort_order>100</sort_order>
            <show_in_default>1</show_in_default>   <!-- Add this to your code -->
            <show_in_website>1</show_in_website>
            <show_in_store>1</show_in_store>