Skip to content
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

Patterns in a plain group fail validation #82

Closed
ryelle opened this issue Apr 21, 2021 · 1 comment · Fixed by #85
Closed

Patterns in a plain group fail validation #82

ryelle opened this issue Apr 21, 2021 · 1 comment · Fixed by #85
Assignees
Labels
[Component] Pattern Directory The backend of the pattern directory: submission, management, etc [Type] Bug Something isn't working

Comments

@ryelle
Copy link
Contributor

ryelle commented Apr 21, 2021

In moving over the new block patterns, I've noticed that patterns wrapped in a group, with no other customization to the group, are considered invalid. Specifically, I get this response:

Updating failed. Pattern content contains only empty blocks.

But if I add more content below the group, or ungroup the blocks, it passes. Grouped blocks are valid, so this should be fixed in the validator.

Test block code:

<!-- wp:group -->
<div class="wp-block-group"><div class="wp-block-group__inner-container"><!-- wp:separator {"className":"is-style-default"} -->
<hr class="wp-block-separator is-style-default"/>
<!-- /wp:separator -->

<!-- wp:image {"align":"center","id":null,"width":150,"height":150,"sizeSlug":"large","linkDestination":"none","className":"is-style-rounded"} -->
<div class="wp-block-image is-style-rounded"><figure class="aligncenter size-large is-resized"><img src="https://s.w.org/images/core/5.8/portrait.jpg" alt="A side profile of a woman in a russet-colored turtleneck and white bag. She looks up with her eyes closed." width="150" height="150"/></figure></div>
<!-- /wp:image -->

<!-- wp:quote {"align":"center","className":"is-style-large"} -->
<blockquote class="wp-block-quote has-text-align-center is-style-large"><p>"Contributing makes me feel like I'm being useful to the planet."</p><cite>— Anna Wong, <em>Volunteer</em></cite></blockquote>
<!-- /wp:quote -->

<!-- wp:separator {"className":"is-style-default"} -->
<hr class="wp-block-separator is-style-default"/>
<!-- /wp:separator --></div></div>
<!-- /wp:group -->
@ryelle ryelle added [Type] Bug Something isn't working [Component] Pattern Directory The backend of the pattern directory: submission, management, etc labels Apr 21, 2021
@ryelle ryelle added this to the Initial Launch milestone Apr 21, 2021
@ryelle
Copy link
Contributor Author

ryelle commented Apr 21, 2021

Looks like columns have the same issue:

Block code
<!-- wp:columns -->
<div class="wp-block-columns"><!-- wp:column -->
<div class="wp-block-column"><!-- wp:spacer -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:paragraph {"style":{"typography":{"fontSize":"21px"},"color":{"text":"#000000"}}} -->
<p class="has-text-color" style="color:#000000;font-size:21px"><strong>We have worked with:</strong></p>
<!-- /wp:paragraph -->

<!-- wp:paragraph {"style":{"typography":{"fontSize":"24px","lineHeight":"1.2"}}} -->
<p style="font-size:24px;line-height:1.2"><a href="https://wordpress.org">EARTHFUND™<br>ARCHWEEKLY<br>FUTURE ROADS<br>BUILDING NY</a></p>
<!-- /wp:paragraph -->

<!-- wp:spacer -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer --></div>
<!-- /wp:column -->

<!-- wp:column -->
<div class="wp-block-column"><!-- wp:spacer {"height":160} -->
<div style="height:160px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer -->

<!-- wp:paragraph {"style":{"typography":{"fontSize":"24px","lineHeight":"1.2"}}} -->
<p style="font-size:24px;line-height:1.2"><a href="https://wordpress.org">DUBAI ROOFS<br>MAY WATSON STUDIO<br>Y.O.L<br>RUDIMENTAR</a></p>
<!-- /wp:paragraph -->

<!-- wp:spacer -->
<div style="height:100px" aria-hidden="true" class="wp-block-spacer"></div>
<!-- /wp:spacer --></div>
<!-- /wp:column --></div>
<!-- /wp:columns -->

<!-- wp:paragraph -->
<p></p>
<!-- /wp:paragraph -->

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Pattern Directory The backend of the pattern directory: submission, management, etc [Type] Bug Something isn't working
Projects
None yet
1 participant