bobbingwide / fizzie

Fizzie theme - a Full Site Editing theme using Gutenberg blocks
9 stars 1 forks source link

Page-content template part descends forever in Visual mode #61

Closed bobbingwide closed 1 year ago

bobbingwide commented 3 years ago

For the following HTML

<!-- wp:group {"backgroundColor":"background","className":"page","layout":{"contentSize":"80%","wideSize":"90%"}} -->
<div class="wp-block-group page has-background-background-color has-background"><!-- wp:post-title {"align":"full","backgroundColor":"light-green-cyan"} /-->

<!-- wp:post-content /--></div>
<!-- /wp:group -->

When viewing the Page content template part in the visual editor it appears that the post-title block is repeated and gets smaller and smaller, until the editor finally gives up with a broken block. The console log reports:

Uncaught Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.

Removing the post-content block prevents the recursion. image

image

Gutenberg 10.3.1

bobbingwide commented 3 years ago

I reproduced the problem with TT1 blocks What's actually happening is that the post-content block is going recursive.

bobbingwide commented 3 years ago

I reproduced the problem with the Phoenix theme.

Using the Site Editor I edited the single page and saved the content group as single-content. Then I tried to edit it from Appearance > Template parts

This animated gif shows the recursion ending with the block failing and the template part's source HTML.

Fizzie issue 61

bobbingwide commented 1 year ago

Fixed in WordPress 5.8