skip to Main Content

I’m testing Upgrade to Magento 2.4 but getting the error below. I’ve read that this error can relate to a missing title attribute in a custom extension. To try and isolate teh issue I have remove all the extensions from /app/code/ folder and then ran upgrade , compile process again but the issue still remains even with all extensions removed.

Any idea how to debug?

1 exception(s):
Exception #0 (LogicException): Could not create an acl object: Invalid Document 
Element 'resource': The attribute 'title' is required but missing.
Line: 13


Exception #0 (LogicException): Could not create an acl object: Invalid Document 
Element 'resource': The attribute 'title' is required but missing.
Line: 13

<pre>#1 MagentoFrameworkAclBuilderProxy->getAcl() called at [vendor/magento/module-backend/Model/Auth/Session.php:229]
#2 MagentoBackendModelAuthSession->processLogin() called at [vendor/magento/module-backend/Model/Auth.php:165]
#3 MagentoBackendModelAuth->login() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#4 MagentoBackendModelAuthInterceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#5 MagentoBackendModelAuthInterceptor->MagentoFrameworkInterception{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#6 MagentoBackendModelAuthInterceptor->___callPlugins() called at [generated/code/Magento/Backend/Model/Auth/Interceptor.php:26]
#7 MagentoBackendModelAuthInterceptor->login() called at [vendor/magento/module-backend/App/Action/Plugin/Authentication.php:205]
#8 MagentoBackendAppActionPluginAuthentication->_performLogin() called at [vendor/magento/module-backend/App/Action/Plugin/Authentication.php:157]
#9 MagentoBackendAppActionPluginAuthentication->_processNotLoggedInUser() called at [vendor/magento/module-backend/App/Action/Plugin/Authentication.php:125]
#10 MagentoBackendAppActionPluginAuthentication->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#11 MagentoBackendControllerAdminhtmlIndexIndexInterceptor->MagentoFrameworkInterception{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#12 MagentoBackendControllerAdminhtmlIndexIndexInterceptor->___callPlugins() called at [generated/code/Magento/Backend/Controller/Adminhtml/Index/Index/Interceptor.php:39]
#13 MagentoBackendControllerAdminhtmlIndexIndexInterceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:186]
#14 MagentoFrameworkAppFrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:118]
#15 MagentoFrameworkAppFrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#16 MagentoFrameworkAppFrontControllerInterceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#17 MagentoFrameworkAppFrontControllerInterceptor->MagentoFrameworkInterception{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#18 MagentoFrameworkAppFrontControllerInterceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#19 MagentoFrameworkAppFrontControllerInterceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116]
#20 MagentoFrameworkAppHttp->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#21 MagentoFrameworkAppBootstrap->run() called at [sitemaps/speedcrete/htdocs/index.php:44]

3

Answers


  1. Merged ACL is validated in development mode using ./vendor/magento/framework/Acl/etc/acl_merged.xsd. Attribute title is required there:

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

    Try to set breakpoint in ./vendor/magento/framework/Config/Reader/Filesystem.php:169 and get merged XML with:

    $configMerger->getDom()->saveXML();
    

    Then use online validator like https://www.freeformatter.com/xml-validator-xsd.html to validate your XML against XSD (use ./vendor/magento/framework/Acl/etc/acl.xsd with required title attribute).

    In my case I’ve disabled some magento modules (Magento_InventoryApi, Magento_InventoryInStorePickupApi):

    <resource id="Magento_InventoryApi::inventory" title="Inventory" ... />
    <resource id="Magento_InventoryInStorePickupApi::inStorePickup" title="In-Store Pickup" ... />
    

    but I’ve not disabled dependent module (Magento_InventoryInStorePickupSalesApi):

    <resource id="Magento_InventoryApi::inventory">
        <resource id="Magento_InventoryInStorePickupApi::inStorePickup">
            <resource id="Magento_InventoryInStorePickupApi::notify_orders_are_ready_for_pickup" title="Notify Orders Are Ready For Pickup" ... />
        </resource>
    </resource>
    

    So, my merged ACL was like:

    <resource id="Magento_InventoryApi::inventory">
        <resource id="Magento_InventoryInStorePickupApi::inStorePickup">
            <resource id="Magento_InventoryInStorePickupApi::notify_orders_are_ready_for_pickup"
                      title="Notify Orders Are Ready For Pickup" translate="title" sortOrder="30"/>
        </resource>
    </resource>
    

    without required attribute title for resource node.

    Login or Signup to reply.
  2. It works for me Alex. Thanks!

    In my case, this configuration generates the xml error.

        'Magento_LoginAsCustomer' => 0,
        'Magento_LoginAsCustomerAdminUi' => 0,
        'Magento_LoginAsCustomerApi' => 0,
        'Magento_LoginAsCustomerAssistance' => 1,
        'Magento_LoginAsCustomerFrontendUi' => 0,
        'Magento_LoginAsCustomerLog' => 0,
        'Magento_LoginAsCustomerLogging' => 0,
        'Magento_LoginAsCustomerPageCache' => 0,
        'Magento_LoginAsCustomerQuote' => 0,
        'Magento_LoginAsCustomerSales' => 0,
        'Magento_LoginAsCustomerWebsiteRestriction' => 0,
    

    Then disabling Magento_LoginAsCustomerAssistance or enabling the other ones, it works!

    Login or Signup to reply.
  3. I had the same issue and the reason was that I had disabled MSI modules. Try to enable these modules again and possibly it will work again.

    php bin/magento module:enable -f Magento_Inventory Magento_InventoryAdminUi Magento_InventoryAdvancedCheckout Magento_InventoryApi Magento_InventoryBundleProduct Magento_InventoryBundleProductAdminUi Magento_InventoryCatalog Magento_InventorySales Magento_InventoryCatalogAdminUi Magento_InventoryCatalogApi Magento_InventoryCatalogSearch Magento_InventoryConfigurableProduct Magento_InventoryConfigurableProductAdminUi Magento_InventoryConfigurableProductIndexer Magento_InventoryConfiguration Magento_InventoryConfigurationApi Magento_InventoryDistanceBasedSourceSelection Magento_InventoryDistanceBasedSourceSelectionAdminUi Magento_InventoryDistanceBasedSourceSelectionApi Magento_InventoryElasticsearch Magento_InventoryExportStockApi Magento_InventoryIndexer Magento_InventorySalesApi Magento_InventoryGroupedProduct Magento_InventoryGroupedProductAdminUi Magento_InventoryGroupedProductIndexer Magento_InventoryImportExport Magento_InventorySourceSelectionApi Magento_InventoryCache Magento_InventoryLowQuantityNotification Magento_InventoryLowQuantityNotificationApi Magento_InventoryMultiDimensionalIndexerApi Magento_InventoryProductAlert Magento_InventoryRequisitionList Magento_InventoryReservations Magento_InventoryReservationCli Magento_InventoryReservationsApi Magento_InventoryExportStock Magento_InventorySalesAdminUi Magento_InventorySalesFrontendUi Magento_InventorySetupFixtureGenerator Magento_InventoryShipping Magento_InventoryShippingAdminUi Magento_InventorySourceDeductionApi Magento_InventorySourceSelection Magento_InventoryLowQuantityNotificationAdminUi Magento_InventoryGraphQl
    

    Don’t forget to flush, reindex and compile if in production mode.

    This is for Magento v2.4.1

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search