1
1 exception(s):
Exception #0 (Exception): Notice: Undefined index: id in C:\wamp64\www\codility-magento-market-place\vendor\magento\module-config\Model\Config\Structure\Element\Iterator.php on line 63

Exception #0 (Exception): Notice: Undefined index: id in C:\wamp64\www\codility-magento-market-place\vendor\magento\module-config\Model\Config\Structure\Element\Iterator.php on line 63
#0 C:\wamp64\www\codility-magento-market-place\vendor\magento\module-config\Model\Config\Structure\Element\Iterator.php(63): Magento\Framework\App\ErrorHandler->handler(8, 'Undefined index...', 'C:\\wamp64\\www\\c...', 63, Array)
#1 C:\wamp64\www\codility-magento-market-place\vendor\magento\module-config\Model\Config\Structure.php(146): Magento\Config\Model\Config\Structure\Element\Iterator->setElements(Array, 'default')
#2 C:\wamp64\www\codility-magento-market-place\generated\code\Magento\Config\Model\Config\Structure\Interceptor.php(24): Magento\Config\Model\Config\Structure->getTabs()
#3 C:\wamp64\www\codility-magento-market-place\vendor\magento\module-config\Model\Config\Structure.php(209): Magento\Config\Model\Config\Structure\Interceptor->getTabs()
#4 C:\wamp64\www\codility-magento-market-place\generated\code\Magento\Config\Model\Config\Structure\Interceptor.php(76): Magento\Config\Model\Config\Structure->getFirstSection()
#5 C:\wamp64\www\codility-magento-market-place\vendor\magento\module-config\Controller\Adminhtml\System\AbstractConfig.php(60): Magento\Config\Model\Config\Structure\Interceptor->getFirstSection()
#6 C:\wamp64\www\codility-magento-market-place\vendor\magento\framework\Interception\Interceptor.php(58): Magento\Config\Controller\Adminhtml\System\AbstractConfig->dispatch(Object(Magento\Framework\App\Request\Http))
#7 C:\wamp64\www\codility-magento-market-place\vendor\magento\framework\Interception\Interceptor.php(138): Magento\Config\Controller\Adminhtml\System\Config\Index\Interceptor->___callParent('dispatch', Array)
#8 C:\wamp64\www\codility-magento-market-place\vendor\magento\module-backend\App\Action\Plugin\Authentication.php(143): Magento\Config\Controller\Adminhtml\System\Config\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#9 C:\wamp64\www\codility-magento-market-place\vendor\magento\framework\Interception\Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Config\Controller\Adminhtml\System\Config\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http))
#10 C:\wamp64\www\codility-magento-market-place\vendor\magento\framework\Interception\Interceptor.php(153): Magento\Config\Controller\Adminhtml\System\Config\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#11 C:\wamp64\www\codility-magento-market-place\generated\code\Magento\Config\Controller\Adminhtml\System\Config\Index\Interceptor.php(39): Magento\Config\Controller\Adminhtml\System\Config\Index\Interceptor->___callPlugins('dispatch', Array, NULL)
#12 C:\wamp64\www\codility-magento-market-place\vendor\magento\framework\App\FrontController.php(55): Magento\Config\Controller\Adminhtml\System\Config\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#13 C:\wamp64\www\codility-magento-market-place\vendor\magento\framework\Interception\Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http))
#14 C:\wamp64\www\codility-magento-market-place\vendor\magento\framework\Interception\Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array)
#15 C:\wamp64\www\codility-magento-market-place\vendor\magento\framework\Interception\Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http))
#16 C:\wamp64\www\codility-magento-market-place\generated\code\Magento\Framework\App\FrontController\Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array)
#17 C:\wamp64\www\codility-magento-market-place\vendor\magento\framework\App\Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#18 C:\wamp64\www\codility-magento-market-place\generated\code\Magento\Framework\App\Http\Interceptor.php(24): Magento\Framework\App\Http->launch()
#19 C:\wamp64\www\codility-magento-market-place\vendor\magento\framework\App\Bootstrap.php(257): Magento\Framework\App\Http\Interceptor->launch()
#20 C:\wamp64\www\codility-magento-market-place\index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#21 {main}

Here my system.xml is

<?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="codility" translate="label" sortOrder="1000">
            <label>Codility</label>
        </tab>
        <section id="discountlabel" translate="label" type="text"
                 sortOrder="100" showInDefault="1" showInWebsite="1" showInStore="1">
            <label>DiscountLabel</label>
            <tab>codility</tab>
            <resource>Codility_DiscountLabel::config_discountlabel</resource>
            <group id="discountlabel_page" translate="label" type="text"
                   sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                <label>Discount page settings</label>
                <field id="discount_activation" translate="label" type="select"
                       sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Activation</label>
                    <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
                </field>
                <field id="discount_calculation" translate="label" type="radios"
                       sortOrder="2" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Discount Calculation</label>
                    <source_model>Codility\DiscountLabel\Model\Config\Backend\DiscountCalculationType</source_model>
                    <comment>
                        <![CDATA[<br />
                        <strong>Manual</strong>: it will be shown discount image or discount label<br />
                        <strong>Automatic</strong>: it will be shown discount calculated by the system; it is possible to select only sticker background and text color.
                        ]]>
                    </comment>
                </field>
                <field id="discount_category" translate="label" type="multiselect"
                       sortOrder="3" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Discount Product Category</label>
                    <source_model>Codility\DiscountLabel\Model\Config\Backend\Categorylist</source_model>
                </field>
                <field id="discount_discountlabel_type" translate="label" type="radios"
                       sortOrder="4" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Sticker Type</label>
                    <source_model>Codility\DiscountLabel\Model\Config\Backend\StickerType</source_model>
                </field>
                <field id="discount_image" translate="label" type="image"
                       sortOrder="5" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Discount Image</label>
                    <comment>Allowed file types: jpg, jpeg, gif, png</comment>
                    <backend_model>Codility\DiscountLabel\Model\Config\Backend\Image</backend_model>
                    <base_url type="media" scope_info="1">codility/discountlabel/images</base_url>
                </field>
                <field id="discount_first_label" translate="label" type="text"
                       sortOrder="6" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>First Label</label>
                    <comment>First label to show in the discount sticker (max 6 chars)</comment>
                </field>
                <field id="discount_second_label" translate="label" type="text"
                       sortOrder="7" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Second Label</label>
                    <comment>Second label to show in the discount sticker (max 6 chars)</comment>
                </field>
                <field id="discount_sticker_background" translate="label" type="text"
                       sortOrder="8" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Sticker Background Color</label>
                    <comment>Sticker background color (Exadecimal value, without #: ex. FFFFFF)</comment>
                </field>
                <field id="discount_sticker_text" translate="label" type="text"
                       sortOrder="9" showInDefault="1" showInWebsite="1" showInStore="1">
                    <label>Sticker Text Color</label>
                    <comment>Sticker text color (Exadecimal value, without #: ex. FFFFFF)</comment>
                </field>
            </group>
        </section>
    </system>
</config>

And Acl.xml is

<?xml version="1.0"?>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/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="Codility_DiscountLabel::config_discountlabel" title="Stickers Section" />
                        </resource>
                    </resource>
                </resource>
            </resource>
        </resources>
    </acl>
</config>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.