0

I have created a custom module. When I have created a demo user and select custom roles for that. My module not showing on the admin side. When I select all the rights it's showing but when I select all/Some of the roles by selection than it's not showing on the admin side. My menu code is like below:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Magento/Backend/etc/menu.xsd">
    <menu>
        <add id="Example_Abc::elements" title="EWD FAQ" module="Example_Abc"  sortOrder="60"  resource="Example_Abc::elements"/>
        <add id="Example_Abc::faq" title="Manage FAQs" module="Example_Abc" parent="Example_Abc::elements" sortOrder="61" action="example_abc/faq" resource="Example_Abc::faq"/>
        <add id="Example_Abc::category" title="Manage Categories" module="Example_Abc" parent="Example_Abc::elements" sortOrder="62" action="example_bc/category" resource="Example_Abc::category"/>
    </menu>
</config>

ACL.XML file

<?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="Example_Abc::faqs" title="FAQs">
                    <resource id="Example_Abc::faq" title="FAQs Manager">
                        <resource id="Example_Abc::faq_create" title="Create"/>
                        <resource id="Example_Abc::faq_edit" title="Edit" />
                        <resource id="Example_Abc::faq_delete" title="Delete"/>
                    </resource>
                    <resource id="Example_Abc::category" title="Categories Manager">
                        <resource id="Example_Abc::category_create" title="Create"/>
                        <resource id="Example_Abc::category_edit" title="Edit" />
                        <resource id="Example_Abc::category_delete" title="Delete"/>
                    </resource>
                </resource>
            </resource>
        </resources>
    </acl>
</config>
1

After changing Example_Abc::elements with Example_Abc::faqs my extension starts on demo user.I have used faqs on acl.xml.My menu code is now like below:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../Magento/Backend/etc/menu.xsd">
    <menu>
        <add id="Example_Abc::faqs" title="EWD FAQ" module="Example_Abc"  sortOrder="60"  resource="Example_Abc::faqs"/>
        <add id="Example_Abc::faq" title="Manage FAQs" module="Example_Abc" parent="Example_Abc::faqs" sortOrder="61" action="example_abc/faq" resource="Example_Abc::faq"/>
        <add id="Example_Abc::category" title="Manage Categories" module="Example_Abc" parent="Example_Abc::faqs" sortOrder="62" action="example_bc/category" resource="Example_Abc::category"/>
    </menu>
</config>

Your Answer

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

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