-
Notifications
You must be signed in to change notification settings - Fork 219
Don't register or unregister if block can't be found #11872
Conversation
The release ZIP for this PR is accessible via:
TypeScript Errors Report
🎉 🎉 This PR does not introduce new TS errors. Script Dependencies ReportThere is no changed script dependency between this branch and trunk. This comment was automatically generated by the |
Size Change: +18 B (0%) Total Size: 1.61 MB
ℹ️ View Unchanged
|
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.
Good catch with this issue, @roykho! Code changes look good to me and it's testing well.
While testing this PR, I found another bug. I might be doing something wrong, but I created an issue just in case: #11882.
It's also happening on trunk
, so not blocking this PR. And given that this is experimental, shouldn't block the release either.
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.
I have also tested this PR and it gets rid of the Block "woocommerce/product-gallery" is not registered.
error correctly.
I feel like there is still something wonky with this registration methods. I am occasionally seeing some race conditions where the |
I didn't notice any abnormal behavior. |
* Updated changelog and added testing instructions * Updated changelog. * Updated versions. * Updated tested up to * Updated tested up to * Uploaded testing zip * Removed #11287 from testing instructions * Added testing instructions and changelog for #11858 * Updated testing zip * Testing instructions for #11862 and #11860 * Updated testing zip * New testing zip with #11872 🍒 * Updated versions to 11.7.0-dev * Updated composer.lock
Same as @danieldudzic, I didn't find anything weird. But it's possibly we missed it if it's a race condition, I will keep an eye in case I can reproduce. |
What
Fixes an issue with #11664
The PR caused a console error
blocks.min.js?ver=7204d43123223474471a:3 Block "woocommerce/product-gallery" is not registered.
becauseproduct-gallery
is under an experimental flag and production builds does not register experimental blocks.Why
To prevent errors in the console.
Testing Instructions
Please consider any edge cases this change may have, and also other areas of the product this may impact.
Test 1: Single Product template
Test 2: Posts
Test 3: Pages
Test 4:
npm run build:deploy
so that only production blocks are built.WooCommerce Visibility
Required: