-
Notifications
You must be signed in to change notification settings - Fork 8
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
[M2P-161] Fix issue with IE11: cart total isn't shown under some condition #808
Conversation
If I'm following this right: this fix is just forcing the page to wait for the customer_data to be initialized? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you clarify the fix @vitaliyreznikov? See @njfaries comment above
Yes, that's correct. Before this PR customer_data can be initialized in the wrong way. It needs to receive parameters for the constructor via phtml file (x-magento-init) - https://github.com/magento/magento2/blob/9544fb243d5848a497d4ea7b88e08609376ac39e/app/code/Magento/Customer/view/frontend/templates/js/customer-data.phtml And before this PR it's possible that |
So I just partially revert this one #801 to fix the isssue. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable, thanks for the explanation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explanation makes sense, thanks.
Description
Please include a summary of the change and which issue is fixed. Include the motivation for the changes, and comment on your PR if necessary for clarity.
An issue was introduced in #801 (2.10.0)
After this PR it's possible that we use Magento sections functional before it initialized properly.
It happens on cart page only, when Magento tried to render order total.
As a result, the order total isn't rendered. Bolt button is shown and it can work if bolt order was loaded before the issue happened.
If, for example, a user clicked add to cart, wait 10 seconds and then go to cart page we can expect bolt button works.
If a user goes to the cart page right after they added something to the cart bolt button doesn't work.
If the bolt button doesn't work, we don't show any error, just nothing happens when clicking it.
Page reload fixes the issue.
The issue doesn't happen on Magento >= 2.3.3, because some sort of protection was introduced
Usually, the issue shouldn't happen because sections initialized even if we didn't check it.
We are able to reproduce the issue on IE11 only, but we can't be sure it doesn't happen on other envs.
This is a race condition issue, so it doesn't happen on IE11 each time, only sometimes.
#changelog [M2P-161] Fix issue with IE11: cart total isn't shown under some condition
Type of change
How Has This Been Tested?
Please validate that you have tested your change in at least one of the following areas:
For PR Reviewer
Checklist: