-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JS files relocation inside the web/js directory not BC in 2.3.x #19291
Comments
Hi @rbayet. Thank you for your report.
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
where @rbayet do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
|
Sorry, can't edit the previous comment to tick the checkboxes when appropriate. The issue is purely related on BC for third party extensions (modules, themes), so it cannot be reproduced on a vanilla Magento instance alone. I could indicate steps to reproduce, but it will require the installation of a third party extension. |
Hello @magento-engcom-team Just to be clear, this one is a "Developer experience issue", making us unable to provide proper compatibility with Magento 2.2 AND 2.3 on our Elasticsuite extension. @rbayet already explained well what we are facing here, and I'm sure we are not alone to build JS components based on the JS components that were affected by this decision to move them. On our specific case, it's due to the Question is : did you squeeze it on purpose (no BC for major version), or is it a mistake ? We need to know it in order to design our own compatibility (and BC) map for the next version of our extension which is meant to support Magento 2.3. Regards |
And btw, @rbayet and me would be glad to submit a PR to fix this one if you ask us to. Regards |
Just to be transparent : the comment I removed was the auto response when assigned. I let you manage the lifecycle/assignment of this issue by yourself. Regards |
@romainruaud Thank you for verifying the issue. Unfortunately, not enough information was provided to created internal ticket. Please consider adding the following:
Once all required information is added, please add label |
@romainruaud Thank you for verifying the issue. Based on the provided information internal tickets |
Thanks for the report @rbayet! I have to assume the missing BC path in |
Summary
The issue #16302 has been fixed both in 2.2.x and 2.3.x lines but only the fix in 2.2.x is BC compatible by providing and "old_path : new_path" mapping in the requirejs-config.js.
Examples
For instance for the 2.2.x line for app/code/Magento/Authorizenet/view/frontend/requirejs-config.js
the combination of 8653ba1 and e0b09fd leads to the following changes :
From
To
(See https://github.com/magento/magento2/blob/2.2-develop/app/code/Magento/Authorizenet/view/frontend/requirejs-config.js)
This means any reference to 'Magento_Payment/transparent' in a third party extension's JS component define() dependency will point correctly to 'Magento_Payment/js/transparent'.
On the other hand, in the 2.3.x line, the changes are simply (see 0ce439b)
From
To
(See https://github.com/magento/magento2/blob/2.3-develop/app/code/Magento/Authorizenet/view/frontend/requirejs-config.js)
This time, any third party extension's JS component define() dependency to 'Magento_Payment/transparent' will fail and break the extension.
Proposed solution
As the BC solution found for the 2.2.x line is not that intrusive, it could also be adopted for the 2.3.x line, eliminating (in some conditions) the need to address those JS files relocation for third party extension authors.
Regards,
Richard.
The text was updated successfully, but these errors were encountered: