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

Product Gallery: block validation error when editing the Product Gallery template part #11882

@Aljullu

Description

@Aljullu

Describe the bug

In trunk, I get an error when loading the Product Gallery template part.¡

To reproduce

  1. From your WordPress dashboard, go to Appearance > Themes. Select a block-based theme like "Twenty-twenty Three," "Twenty-twenty Four," etc.
  2. On the left-hand side menu, click on Appearance > Editor.
  3. Go to Patterns > General > Product Gallery.
  4. Notice the block isn't loaded as there is invalid content: This block contains unexpected or invalid content. and there is this error in the console:
Block validation: Block validation failed for `woocommerce/product-gallery`.
Content generated by `save` function:

<div class="wp-block-woocommerce-product-gallery alignwide wc-block-product-gallery wc-block-product-gallery--has-next-previous-buttons-inside-image"></div>

Content retrieved from post body:

<div
		class="wp-block-woocommerce-product-gallery wc-block-product-gallery wc-block-product-gallery--has-next-previous-buttons-inside-image">
		

		
	</div>

Expected behavior

The block should load correctly.

Screenshots

imatge

Environment

WordPress (please complete the following information):

  • WordPress version: 6.4.1
  • Gutenberg version (if installed): none
  • WooCommerce version: 8.3.1
  • WooCommerce Blocks version: 11.6.0-dev (trunk at the time of writing this)
  • Site language: English
  • Any other plugins installed: none

Metadata

Metadata

Assignees

Labels

block: product image galleryIssues related to the Product Image Gallery block.type: bugThe issue/PR concerns a confirmed bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions