Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Investigate why WordPress.com bug only happen for Cart and not Checkout block #7424

Closed
senadir opened this issue Oct 18, 2022 · 3 comments
Closed
Labels
block: cart Issues related to the cart block. type: bug The issue/PR concerns a confirmed bug.

Comments

@senadir
Copy link
Member

senadir commented Oct 18, 2022

In #5866 and #7367, we worked around the WordPress.com issue. We know for sure that WordPress.com code is monkeypatching some wp.data functions, mainly replaceBlocks and replaceInnerBlocks, and causing them to have an unstanble reference, which throws useForcedLayout into an infinite loop.

What we don't know, is why this only happens in Cart block and not Checkout block, and why it went away and returned. From my understanding, something in our code is shortcutting useForcedLayout early in Checkout, and did so for Cart, but surfaced again.

It would be good to understand this so if we can't fix it in WordPress.com, we have better mitigation.

It should be noted that, like #6718, this is just a temporary fix for a single place, it is very likely that the monkeypatching code will touch several places in our code base, and we will need to fix everyone of them, a better solution would be to fix it from the root.

@senadir senadir added type: bug The issue/PR concerns a confirmed bug. block: cart Issues related to the cart block. labels Oct 18, 2022
@ralucaStan
Copy link
Contributor

Adding external issue for reference Automattic/wp-calypso#66092

@ralucaStan
Copy link
Contributor

We have some next steps based on pca54o-4GY-p2#comment-4658.

We'll try in #7637 the proposed solution. If that fixes the issue this investigation won't be necessary.

@ralucaStan
Copy link
Contributor

Closing this as the initial issue was fixed in #7879. If we need to investigate at some point in the future we can reopen.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: cart Issues related to the cart block. type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

No branches or pull requests

2 participants