-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Guard Magento_Catalog JavaScript from lack of minicart #34185
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
Guard Magento_Catalog JavaScript from lack of minicart #34185
Conversation
Hi @fredden. Thank you for your contribution
❗ Automated tests can be triggered manually with an appropriate comment:
You can find more information about the builds here ℹ️ Please run only needed test builds instead of all when developing. Please run all test builds before sending your PR for review. For more details, please, review the Magento Contributor Guide documentation. 🕙 You can find the schedule on the Magento Community Calendar page. 📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, please join the Community Contributions Triage session to discuss the appropriate ticket. 🎥 You can find the recording of the previous Community Contributions Triage on the Magento Youtube Channel ✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
Hi @sidolov, thank you for the review.
|
@magento run Functional Tests EE |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento run Functional Tests EE |
The requested builds are added to the queue. You should be able to see them here within a few minutes. Please re-request them if they don't show in a reasonable amount of time. |
@magento give me 2.4-develop instance |
Hi @engcom-Alfa. Thank you for your request. I'm working on Magento instance for you. |
Hi @engcom-Alfa, here is your Magento Instance: https://451942eeced9f7268dbe562f2b953d3a-2-4-develop.instances.magento-community.engineering |
@magento create issue |
✔️ QA Passed Preconditions:
Manual testing scenario:
Before: ✖️ Used to get the Uncaught TypeError After: ✔️ There is no Uncaught TypeError Since it is relevant to the console error fix, and has no impact on any other feature functionally, there is no additional regression is required |
Description
When the mini-cart is removed, or during the checkout,
Magento_Catalog::js/product/storage/ids-storage-compare.js
throws an error. The error is masked during checkout because there is a DOM element withid="checkout"
which some browsers make available onwindow.checkout
(so there's no error but the information assumed to be present isn't there).This pull request changes the guard logic to protect against this error.
Edit: I found three more places where the lack of minicart causes errors. The minicart.js itself also suffers from this assumption, but I chose to not patch that here.
Related Pull Requests
None
Manual testing scenarios (*)
<referenceBlock name="minicart" remove="true" />
)Questions or comments
None
Contribution checklist (*)
Resolved issues: