core/post-content patterns fail to render preview on page creation of patterns referenced within them #45586
Labels
[Feature] Patterns
A collection of blocks that can be synced (previously reusable blocks) or unsynced
Needs Testing
Needs further testing to be confirmed.
Description
I noticed I can create page template patterns (that autoload on page creation) fine by building out content in the editor and then copying the code, but I'd like to create these core/post-content patterns with just a few references to my other section style patterns (otherwise there is a lot of repeating the same pattern multiple places making it hard to maintain). When I try to do this manually it breaks the preview when creating a new page. You can see that the "page text basic" renders partly the block markup, but not the included patterns.
For reference, the patterns still work perfectly when you click to insert them, it is just the preview that does not work. I can also insert them, the switch to code, copy everything and use that as a core/post-content pattern and the preview works again. It is just the pattern reference within preview that is breaking.
Full disclosure: this is happening in a custom theme, so could be a syntax issue, but the behavior of the pattern working but not the preview seemed like a possible bug to me, so wanted to flag.
Step-by-step reproduction instructions
<!-- wp:pattern {"slug":"example/hero"} /-->
Screenshots, screen recording, code snippet
Environment info
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: