1

On

Stores -> Configuration -> Sales

i amtrying to add one more section there is no groups yet:

Lukas\DeliveryNotification\etc\adminhtml\system.xml

<?xml version="1.0"?>
<!--
/**
 * Copyright © Magento, Inc. All rights reserved.
 * See COPYING.txt for license details.
 */
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
    <section id="deliveryNotification" translate="label" type="text" sortOrder="300" showInDefault="1" showInWebsite="1" showInStore="1">
        <label>Shipping Notifications</label>
        <tab>sales</tab>
        <resource>Lukas_DeliveryNotification::lukas_deliveryNotification</resource>
    </section>
</system>

Lukas\DeliveryNotification\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="Lukas_DeliveryNotification::lukas_deliveryNotification" title="Delivery Notification" />
                    </resource>
                </resource>
            </resource>
        </resource>
    </resources>
</acl>

But it does not get added, what is the problem?

1 Answer 1

3

First, verify your system.xml file is in etc/adminhtml folder

Second, notice resource parameter is missing in your code (not sure, if it's really required, but it seems so). Take a look at this references

https://www.mageplaza.com/magento-2-module-development/create-system-xml-configuration-magento-2.html

Magento 2 - How to add a custom store config in an existing tab?

2
  • Very strange, system.xml is in correct pathway Lukas\DeliveryNotification\etc\adminhtml\system.xml I added the resource aswell, cleaned cache. Still no result Commented Oct 11, 2018 at 8:48
  • 1
    Seems that adding <group> to <section> fixes it Commented Oct 11, 2018 at 10:06

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.