Closed
Description
This issue is automatically created based on existing pull request: #34185: Guard Magento_Catalog JavaScript from lack of minicart
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 with id="checkout"
which some browsers make available on window.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 (*)
- Remove the mini cart via layout (
<referenceBlock name="minicart" remove="true" />
) - Add an item to the 'compare' list
- Witness error on JavaScript console / lack of error after this change
Questions or comments
None
Contribution checklist (*)
- Pull request has a meaningful description of its purpose
- All commits are accompanied by meaningful commit messages
- All new or changed code is covered with unit/integration tests (if applicable)
- README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
- All automated tests passed successfully (all builds are green)
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.4-develop branchGate 3 Passed. Manual verification of the issue completed. Issue is confirmedA defect with this priority could have functionality issues which are not to expectations.Indicates original Magento version for the Issue report.The issue has been reproduced on latest 2.4-develop branch
Type
Projects
Status
Done