Javascript files for checkout cannot be accessed, wrong src
densen45 opened this issue · comments
Preconditions and environment
- Magento version 2.4.7
- Deployed on a server that is reachable through the internet
- Activate merge and minify JavaScripts
- Deploy Mode: production
- One page checkout
- behind Cloudflare proxy with their Rocket Loader
Steps to reproduce
- Add a product to the shopping cart
- Proceed to checkout
Expected result
The checkout renders.
Actual result
Several Javascript files cannot be found and loading of the checkout stops with the loader gif.
Additional information
The src attribute of the <script>-HTML tags seems to be wrong for several files.
Failed GET requests from the browser console:
https://magento.domain/checkout/jquery.min.js
https://magento.domain/checkout/mage/common.min.js
https://magento.domain/checkout/mage/dataPost.min.js
https://magento.domain/checkout/mage/bootstrap.min.js
https://magento.domain/checkout/Magento_Ui/js/core/app.min.js
https://magento.domain/checkout/Magento_PageCache/js/form-key-provider.min.js
https://magento.domain/checkout/Magento_Translation/js/mage-translation-dictionary.min.js
https://magento.domain/checkout/Magento_Theme/js/theme.min.js
Corresponding <script> tags from the :
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="jquery" src="./jquery.min.js"></script>
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="mage/common" src="./mage/common.min.js"></script>
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="mage/dataPost" src="./mage/dataPost.min.js"></script>
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="mage/bootstrap" src="./mage/bootstrap.min.js"></script>
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="Magento_Ui/js/core/app" src="./Magento_Ui/js/core/app.min.js"></script>
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="Magento_PageCache/js/form-key-provider" src="./Magento_PageCache/js/form-key-provider.min.js"></script>
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="Magento_Translation/js/mage-translation-dictionary" src="./Magento_Translation/js/mage-translation-dictionary.min.js"></script>
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="Magento_Theme/js/theme" src="./Magento_Theme/js/theme.min.js"></script>
In my previous installation (Magento 2.4.6-p4) the src attributes contain the fully qualified path, e.g.:
<script type="text/javascript" charset="utf-8" async="" data-requirecontext="_" data-requiremodule="jquery/ui-modules/unique-id" src="https://magento.domain/static/version1715599329/frontend/<vendor>/<theme>/<locale>/Magento_Theme/js/theme.min.js"></script>
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Hi @densen45. 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- For more details, review the Magento Contributor Assistant documentation.
- Add a comment to assign the issue:
@magento I am working on this
- To learn more about issue processing workflow, refer to the Code Contributions.
Join Magento Community Engineering Slack and ask your questions in #github channel.
🕙 You can find the schedule on the Magento Community Calendar page.
📞 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.
Hi @densen45. Thank you for your request. I'm working on Magento instance for you.
Hi @densen45, here is your Magento Instance: https://a77d3a880134016fe99a68334ceca351.instances-prod.magento-community.engineering
Admin access: https://a77d3a880134016fe99a68334ceca351.instances-prod.magento-community.engineering/admin_f1e2
Login: 10fd2c59
Password: fbdf10238a71
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: 👇
- 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
- 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue.
- 3. Add
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to. - 4. Verify that the issue is reproducible on
2.4-develop
branchDetails
- Add the comment@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-develop
branch, please, add the labelReproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here! - 5. Add label
Issue: Confirmed
once verification is complete. - 6. Make sure that automatic system confirms that report has been added to the backlog.
Hi @engcom-Dash. 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: 👇
-
- Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
-
- Verify that issue has a meaningful description and provides enough information to reproduce the issue.
-
- Add
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.
- Add
-
- Verify that the issue is reproducible on
2.4-develop
branchDetails
- Add the comment@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-develop
branch, please, add the labelReproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
- Verify that the issue is reproducible on
- Join Magento Community Engineering Slack and ask your questions in #github channel.
Hi @densen45. Thank you for your request. I'm working on Magento instance for you.
Hi @densen45, here is your Magento Instance: https://a77d3a880134016fe99a68334ceca351.instances-prod.magento-community.engineering
Admin access: https://a77d3a880134016fe99a68334ceca351.instances-prod.magento-community.engineering/admin_8c60
Login: 9db78e47
Password: 7727525ee1cf
I cannot reproduce the issue on the provided Magento instance.
It's probably not a bug in general, but an issue with my setup.
Does anyone facing a similar issue or has a hint for me how to debug/solve such issue?
Hi @densen45
Thanks for reporting and collaboration.
Verified the issue on magento 2.4 dev instance but the issue is not reproducible.
We are able to place the order successfully.
Steps to reproduce
- Add a product to the shopping cart
- Proceed to checkout
Please refer the attached screenshots. Let us know if we missed anything.
@engcom-Dash thank you for your investigation! You didn't missed anything.
The reason for my issue was not Magento itself, but the Cloudflare Proxy, respectively their Rocket Loader, as I described here: https://community.cloudflare.com/t/another-magento-2-4-7-csp-sri-issue-on-checkout-page/655947
I'm closing this issue.