[ ] I have carried out troubleshooting steps and I believe I have found a bug.
[ ] I have searched for similar bugs in both open and closed issues and cannot find a duplicate.
Describe the bug
Adding a Query Loop or a Product Collection block within the Single Product container breaks the execution sequence, as expected by the Single Product's block context handler. That's because the woocommerce/product-template block's inner blocks are repeated for each query result, and these additional renders do not exist within the $this->single_product_inner_blocks_names array.
Expected behavior
The special needs of a Post/Product Template block should be utilized in the recurring process of passing the context.
Actual behavior
Currently, the Post/ProductTemplate blocks are rendering more inner blocks than whats expected when fetching the blocks inner blocks.
See
Steps to reproduce
Create a new page/post.
Add a Single Product block and select a product.
Add a QueryLoop block or a Product Collection block on top of the product title.
Save and navigate to storefront.
Notice the blocks being broken.
WordPress Environment
-
Isolating the problem
[ ] I have deactivated other plugins and confirmed this bug occurs when only WooCommerce plugin is active.
[ ] This bug happens with a default WordPress theme active, or Storefront.
[X] I can reproduce this bug consistently using the steps above.
Prerequisites
Describe the bug
Adding a Query Loop or a Product Collection block within the Single Product container breaks the execution sequence, as expected by the Single Product's block context handler. That's because the
woocommerce/product-template
block's inner blocks are repeated for each query result, and these additional renders do not exist within the$this->single_product_inner_blocks_names
array.Expected behavior
The special needs of a Post/Product Template block should be utilized in the recurring process of passing the context.
Actual behavior
Currently, the Post/ProductTemplate blocks are rendering more inner blocks than whats expected when fetching the blocks inner blocks.
See
Steps to reproduce
WordPress Environment
-
Isolating the problem