You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
core/post-content patterns fail to render preview on page creation of patterns referenced within them #45586
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
add a standard pattern to your block theme like "hero section"
create a pattern with Block Types: core/post-content
Add the standard pattern to this template like so <!-- wp:pattern {"slug":"example/hero"} /-->
Create a new page and the preview does not seem to render the pattern
Screenshots, screen recording, code snippet
Environment info
WordPress 6.1
Custom Theme This could an issue with the way my custom theme is setup, but the patterns still work perfectly so the behavior seems like a potential bug and wanted to flag
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Hi @aplauche, this is a known issue and has been fixed in the latest version of Gutenberg. See the related PR here: #44784.
Can you try testing again using Gutenberg 14.4? I have tested on my end using the Twenty Twenty-Three theme, and the nested patterns are displaying as expected. Thanks!
Activity
ndiego commentedon Nov 8, 2022
Hi @aplauche, this is a known issue and has been fixed in the latest version of Gutenberg. See the related PR here: #44784.
Can you try testing again using Gutenberg 14.4? I have tested on my end using the Twenty Twenty-Three theme, and the nested patterns are displaying as expected. Thanks!
aplauche commentedon Nov 8, 2022
@ndiego Thanks for the info! Just tested and can confirm all is working perfectly with Gutenberg 14.4. Closing now!