I am trying to add a configuration tab to the magento admin for my custom module. The problem is that the tab is not showing and no error is given.
this is my acl.xml
<code>
<?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">
<!-- this resource id we can use in system.xml for section -->
<resource id="Xlii_Ekomi::config_xlii_ekomi" title="Helloworld Section" sortOrder="80" />
</resource>
</resource>
</resource>
</resource>
</resources>
</acl>
</config>
</code>
and this is my system.xml
<code>
<?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>
<!-- Add new Tab -->
<tab id="xlii" translate="label" sortOrder="300">
<label>Darsh Banner</label>
</tab>
<section id="xlii_ekomi" translate="label" type="text" sortOrder="140" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Helloworld</label>
<tab>xlii</tab>
<!-- resource tag name which we have to defined in the acl.xml -->
<resource>Xlii_Ekomi::config_xlii_ekomi</resource>
</section>
<group id="general" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>General Options</label>
<field id="active" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Enabled</label>
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
</field>
</group>
</system>
</config>
</code>
Best Answer
Check This Code Its Works for me:
acl.xml
system.xml file:
module.xml
registration.php
sample answer:
Let me know any problem occur.