Open pmzandbergen opened 3 months ago
Hi @pmzandbergen. 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:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
Hello @pmzandbergen,
Thanks for the report and collaboration!
I agree with your point, in the provided code from app/code/Magento/Csp/Model/Mode/ConfigManager.php
, the Magento\Csp\Model\Mode\Data\ModeConfigured
object is being instantiated directly using the new keyword.
When an object is created directly like this, Magento's Object Manager is bypassed, which means that any plugins (interceptors) that might be defined for that class will not be triggered.
Hence confirming the issue.
Thanks
Hi @engcom-Hotel. 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:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. @magento I am working on this
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12299 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Hotel. Thank you for verifying the issue.
Issue Available: @engcom-Hotel, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
Hello @pmzandbergen,
Thanks for the report and collaboration!
I agree with your point, in the provided code from
app/code/Magento/Csp/Model/Mode/ConfigManager.php
, theMagento\Csp\Model\Mode\Data\ModeConfigured
object is being instantiated directly using the new keyword.When an object is created directly like this, Magento's Object Manager is bypassed, which means that any plugins (interceptors) that might be defined for that class will not be triggered.
Hence confirming the issue.
Thanks
Shall I create a PR with the required changes, or is @thecodecook14 working on this?
:x: Cannot export the issue. This GitHub issue is already linked to Jira issue(s): https://jira.corp.adobe.com/browse/AC-12299
Shall I create a PR with the required changes ...
Looks like @glo24157 started working on it on this branch: https://github.com/magento/magento2/commits/issue38875/
PR is ready for review: https://github.com/magento/magento2/pull/38886
File https://github.com/magento/magento2/blob/ef81f5a2f8271ea529606fcb56898eed286d46b5/app/code/Magento/Csp/Model/Mode/ConfigManager.php#L121
Description The Object Manager is not being used when creating
Magento\Csp\Model\Mode\Data\ModeConfigured
. Therefore Plugins can't be used on this object.