Invalid Document Element resource The attribute title is required in Magento 2x

Problem: This issue is come to when we install module and theme and etc in the Magento 2.x.

Suppose we have to insert the module in code folder, then we start to run below command:

sudo php bin/magento setup:upgrade

Showing error “Invalid Document Element ‘resource’: The attribute ‘title’ is required but missing”

Solution: You can change the “Adminhtml” to “Backend” in below code then it works.

app/code/module_vender/module_name/etc/acl.xml

Resource tag Before change :

<resource id="Magento_Adminhtml::admin">

Resource tag After change :

<resource id="Magento_Backend::admin">

Final code showing as below.

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Acl/etc/acl.xsd">
    <acl>
        <resources>
            <resource id="Magento_Backend::admin">
                <resource id="Alex_Videogallery::video" title="video" sortOrder="100" translate="title"/> 
            </resource>
        </resources>
    </acl>
</config>

When you start work in Magento than firstly set developer mode.

Change To Developer Mode Using Command Line:

php bin/magento deploy:mode:set developer

If there any issues regarding this article please comment on the same.

Thanks for your reading this article, if this article is helpful for your project. So please comment on the same and share your friend’s circle.

Please follow and like us:
error

Leave a Reply

Your email address will not be published. Required fields are marked *