Skip to content
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

[Issue] Guard Magento_Catalog JavaScript from lack of minicart #34513

Closed
3 of 5 tasks
m2-assistant bot opened this issue Nov 3, 2021 · 3 comments · Fixed by #34185
Closed
3 of 5 tasks

[Issue] Guard Magento_Catalog JavaScript from lack of minicart #34513

m2-assistant bot opened this issue Nov 3, 2021 · 3 comments · Fixed by #34185
Assignees
Labels
Area: Cart & Checkout Component: Catalog Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch

Comments

@m2-assistant
Copy link

m2-assistant bot commented Nov 3, 2021

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 (*)

  1. Remove the mini cart via layout (<referenceBlock name="minicart" remove="true" />)
  2. Add an item to the 'compare' list
  3. Witness error on JavaScript console / lack of error after this change

Screenshot_2021-09-28_22-05-27

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)
@m2-assistant m2-assistant bot added Component: Catalog Priority: P2 A defect with this priority could have functionality issues which are not to expectations. labels Nov 3, 2021
@m2-community-project m2-community-project bot added this to Pull Request In Progress in High Priority Backlog Nov 3, 2021
@engcom-Alfa engcom-Alfa added Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Area: Cart & Checkout Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed labels Nov 3, 2021
@github-jira-sync-bot
Copy link

✅ Jira issue https://jira.corp.magento.com/browse/AC-1625 is successfully created for this GitHub issue.

@m2-assistant
Copy link
Author

m2-assistant bot commented Nov 3, 2021

✅ Confirmed by @engcom-Alfa. Thank you for verifying the issue.
Issue Available: @engcom-Alfa, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@sidolov sidolov added the Fixed in 2.4.x The issue has been fixed in 2.4-develop branch label Nov 5, 2021
@sidolov
Copy link
Contributor

sidolov commented Nov 5, 2021

Hi @m2-assistant[bot]. Thank you for your report.
The issue has been fixed in #34185 by @fredden in 2.4-develop branch
Related commit(s):

The fix will be available with the upcoming release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Cart & Checkout Component: Catalog Fixed in 2.4.x The issue has been fixed in 2.4-develop branch Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: done Reported on 2.4.x Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch
Projects
Development

Successfully merging a pull request may close this issue.

4 participants