Magento 2.2.0 – Invalid Document Element ‘resource’: The Attribute ‘title’ is Required but Missing

magento-upgrademagento2magento2.2.0

I am trying to upgrade a website from Magento 2.1.8 to 2.2.0

I have configured composer for 2.2.0 and also updated it with command line.

Now when I run magento setup:upgrade its halt on running schema and showing following note: pfa for more info.

Running schema recurring…Invalid Document Element 'resource': The
attribute 'title' is required but missing. Line: 12

Element 'resource': The attribute 'title' is required but missing.
Line: 13

enter image description here

Best Answer

My best guess is that you have a <resource>-tag in any etc/acl.xml-file with a missing title-attribute. Usually this would throw the issue that you could not create or edit a new role. I'm guessing that they created an extra check in 2.2 to detect this more earlier.

Better check the acl.xml-files of your own custom extensions and/or those of 3rd party extensions. Please note: the title-attribute is only required for new <resource>-nodes. So if your adding a new resource-node to an existing resource node (provided by another module) there is no need to add the title-attribute to those. For example:

<!-- provided by Magento_Backend, so they already have a title: -->
<resource id="Magento_Backend::stores">
    <resource id="Magento_Backend::stores_settings">
        <!-- provided by Magento_Config: -->
        <resource id="Magento_Config::config">
            <!-- New resource! Title is required: -->
            <resource id="Vendor_Module::config_general" title="Something" translate="title"/> 
        </resource>
    </resource>
</resource>
Related Topic