0

After upgrading to Magento 2.4.7-p1 I am seeing the following error when trying to login into the backend:

1 exception(s): Exception #0 (LogicException): Could not create an acl object: Invalid Document Error in merged XML after reading /var/www/dev/magento2/vendor/magento/module-config/etc/acl.xml Element 'resource': The attribute 'title' is required but missing. Line: 19 The xml was: 14: <!-- 15: @deprecated Magento_Config::advanced section ('Advanced Section') is disabled and is not displayed in the admin panel 16: --> 17: <resource id="Magento_Config::advanced" title="Advanced Section" translate="title" sortOrder="90" disabled="true"/> 18: <resource id="Magento_Config::config_admin" title="Advanced Admin Section" translate="title" sortOrder="100"/> 19: <resource id="Magento_Config::config_design" title="Design Section" translate="title" sortOrder="40"/> 20: <resource id="Magento_Config::config_general" title="General Section" translate="title" sortOrder="20"/> 21: <resource id="Magento_Config::config_system" title="System Section" translate="title" sortOrder="80"/> 22: <resource id="Magento_Config::currency" title="Currency Setup Section" translate="title" sortOrder="120"/> 23: <resource id="Magento_Config::dev" title="Developer Section" translate="title" sortOrder="110"/> 

2 Answers 2

1

A workaround for this problem after upgrading to Magento 2.4.7 is to edit the following file:

/vendor/magento/framework/Acl/etc/acl_merged.xsd 

Modify

<xs:attribute name="title" type="typeTitle" use="required" /> 

Change to

<xs:attribute name="title" type="typeTitle" use="optional" /> 

See https://github.com/magento/magento2/issues/38839 for more info.

0

Check you ACL's of all modules. As error says title is required. But it throws error which shows core code. I suspect there is a module that has invalid acl.

To find it easily I would go to the \Magento\Framework\Acl\Builder::getAcl
Add a temporary logger (remove it afterwards)

$writer = new \Zend_Log_Writer_Stream(BP . '/var/log/custom.log'); $logger = new \Zend_Log(); $logger->addWriter($writer); $logger->info(); 

And Try to log whatever is happening there. Maybe try to get info from $this->_acl object.

This is usually how I find invalid xmls after Magento updates.

Or another way - disable custom modules one by one (or do binary search by disabling half of the custom modules and checking results, if issue persists - disable half of what is left and continue until you find it).

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.