magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.54k stars 9.32k forks source link

`Magento_ServiceProxy` has an undefined hard dependency on `Magento_PaymentServicesDashboard` #39124

Closed fritzmg closed 4 weeks ago

fritzmg commented 2 months ago

Preconditions and environment

Steps to reproduce

  1. Install Magento 2.4.7-p2
  2. Disable Magento_PaymentServicesDashboard (and all modules that Magento says depend on it).
  3. Access the back end

Expected result

The back end can be accessed.

Actual result

The following error occurs:

Exception #0 (LogicException): Could not create an acl object: Invalid Document 
Error in merged XML after reading vendor/magento/module-config/etc/acl.xml
Element 'resource': The attribute 'title' is required but missing.

Additional information

The problem is, that Magento_ServiceProxy actually depends on Magento_PaymentServicesDashboard because it references a <resource> in its etc/acl.xml that is actually defined by Magento_PaymentServicesDashboard:

<!-- vendor/magento/module-service-proxy/etc/acl.xml -->
<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="Magento_Sales::sales">
                    <resource id="Magento_Sales::sales_operation">
                        <resource id="Magento_PaymentServicesDashboard::paymentservices">
                            <resource id="Magento_ServiceProxy::services" title="Saas Services Proxy" translate="title" sortOrder="100"/>
                        </resource>
                    </resource>
                </resource>
            </resource>
        </resources>
    </acl>
</config>

The <resource id="Magento_PaymentServicesDashboard::paymentservices"> would be defined by Magento_PaymentServicesDashboard, but since the latter is disabled, the <resource> does not exist and the XML validation will then fail with the aforementioned error.

Release note

No response

Triage and priority

m2-assistant[bot] commented 2 months ago

Hi @fritzmg. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

m2-assistant[bot] commented 2 months ago

Hi @engcom-Bravo. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

engcom-Bravo commented 2 months ago

Hi @fritzmg,

Thanks for your reporting and collaboration.

We have verified the issue in Latest 2.4-develop instance and the issue is not reproducible.Kindly refer the screenshots.

Screenshot 2024-09-02 at 15 17 22

We are still able to access the backend.

Kindly recheck the issue in Latest 2.4-develop instance and elaborate the steps to reproduce if the issue is still reproducible.

Thanks.

fritzmg commented 2 months ago

@engcom-Bravo I think you did not follow the reproduction steps exactly:

Disable Magento_PaymentServicesDashboard (and all modules that Magento says depend on it).

According to your screenshot you haven't disabled all modules that depend on Magento_PaymentServicesDashboard.

RichardOutram commented 4 weeks ago

This issue happened for me to.

Related to this https://github.com/magento/magento2/issues/38839#issuecomment-2356281493

engcom-Bravo commented 4 weeks ago

@RichardOutram Thanks for your contribution!!.

Hi @fritzmg,

Thanks for your update.

similar issue has been confirmed here https://github.com/magento/magento2/issues/38839.

Hence we are closing this as duplicate.

Thanks.