11

I visited many sites for find solution of this issue.

But after creating system.xml and acl.xml Magento give me a report generated error.

Error

a:4:{i:0;s:140:"Notice: Undefined index: id in /usr/local/ampps/www/mgn2/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php on line 59";i:1;s:6391:"#0 /usr/local/ampps/www/mgn2/vendor/magento/module-config/Model/Config/Structure/Element/Iterator.php(59): Magento\Framework\App\ErrorHandler->handler(8, 'Undefined index...', '/usr/local/ampp...', 59, Array)

Can you clarify this issues?

app/code/Pulsestorm/HelloWorldMVVM/etc/adminhtml/system.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="Pulsestorm" translate="label" sortOrder="200">
            <label>Pulsestorm</label>
        </tab>
        <section id="config_helloworld" translate="label" type="text" sortOrder="110" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>Pulsestorm</label>
            <tab>HelloWorldMVVM</tab>
            <resource>Pulsestorm_HelloWorldMVVM::config_helloworldmvvm</resource>
            <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
                <label>General</label>
                <field id="enable" translate="label comment" type="select" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Enable Hello World</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="block_label" translate="label" type="text" sortOrder="20" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Module page title</label>
                </field>
            </group>
        </section>
    </system>
</config>

app/code/PulseStorm/HelloWorldMVVM/etc/acl.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Magento_Backend::admin">
                <resource id="Magento_Backend::stores">
                    <resource id="Magento_Backend::stores_settings">
                        <resource id="Magento_Config::config">
                            <resource id="Pulsestorm_HelloWorldMVVM::config_helloworldmvvm" title="HelloWorldMVVM" />
                        </resource>
                    </resource>
                </resource>
            </resource>
        </resources>
    </acl>
</config>

1 Answer 1

22

In your system.xml replace this

<tab>HelloWorldMVVM</tab>

with this

<tab>Pulsestorm</tab>
7
  • @Marius: Can you share a bit context? I get the same error but I'm puzzled what to enter in my case.
    – hakre
    Commented Sep 23, 2016 at 10:19
  • 2
    you are referencing a tab that does not exist. Each <tab> tag has an id and this way you can add sections under certain tabs. But if you add a section under a tab that does not exist you get the error above.
    – Marius
    Commented Sep 23, 2016 at 10:27
  • @Marius: Yes, just found it myself, too. Thanks a lot. Now on to the next mystery ... :)
    – hakre
    Commented Sep 23, 2016 at 10:30
  • @Marius: Me too faced same type of issue. Fixed by your answer thanks a lot ;)
    – Srihari
    Commented Oct 5, 2016 at 6:43
  • Tanks. i have face an issue with it and now got the solution
    – Amit Bera
    Commented Jun 7, 2017 at 11:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.