Symptom. You register a block pattern. It appears in the inserter. You insert it into a template in the Site Editor, and the outer container renders while the nested blocks — pagination, no-results, an inner group, whatever the pattern was supposed to contain — do not. Save the template, refresh the editor, and they appear. Or they don’t. The two outcomes point at different layers, and the first job is to stop calling them the same problem.
The phrase “a block pattern’s InnerBlocks” is doing damage here. A pattern is registered Block HTML Markup — a string of serialized blocks passed as the content property of register_block_pattern(). InnerBlocks is a React component inside a block type’s edit and save functions. A pattern does not have InnerBlocks in the API sense. It has nested blocks in its content. Naming the failure precisely is half the triage, because the fixes live in different places: pattern registration and markup on one side, block type registration and editor rendering on the other.
Layer 1: Is the pattern itself well-formed?
Start with the registration call. The Block Editor handbook is explicit that register_block_pattern() takes a name in namespace/title form and a properties array whose required keys are title and content, and that content is “Block HTML Markup for the pattern” (Block Patterns reference). If you passed rendered HTML, a shortcode, or a PHP template fragment instead of serialized block comments, the editor has nothing to parse into nested blocks. The outer wrapper may still appear because the parser falls back to freeform or classic content.
A minimal, correct registration looks like this:
add_action( 'init', function () {
register_block_pattern(
'my-plugin/query-with-pagination',
array(
'title' => __( 'Query with pagination', 'my-plugin' ),
'categories' => array( 'query' ),
'content' => '<!-- wp:query {"queryId":1,"query":{"perPage":3,"pages":0,"offset":0,"postType":"post","order":"desc","orderBy":"date","author":"","search":"","exclude":[],"sticky":"","inherit":false}} -->
<div class="wp-block-query"><!-- wp:post-template -->
<!-- wp:post-title /-->
<!-- /wp:post-template -->
<!-- wp:query-pagination -->
<!-- wp:query-pagination-previous /-->
<!-- wp:query-pagination-numbers /-->
<!-- wp:query-pagination-next /-->
<!-- /wp:query-pagination -->
<!-- wp:query-no-results -->
<!-- wp:paragraph --><p>Nothing found.</p><!-- /wp:paragraph -->
<!-- /wp:query-no-results --></div>
<!-- /wp:query -->',
)
);
} );
Two registration details cause silent failures that look like rendering bugs:
- Hook timing. The handbook states that
register_block_pattern()should be called from a handler attached toinit. Registering onafter_setup_themeor inside a template file can leave the pattern absent from the editor’s pattern list or present without its content being parsed in time. - Context restrictions.
postTypeslimits the pattern to specific post types, and outside those types “the pattern is not available at all.”templateTypesdoes the same for template types such as404orsingle-post. A pattern that works in a post but not in the Site Editor’s template context may simply be restricted out of that context rather than failing to render.
Verify what the registry actually holds before touching anything else. WP-CLI gives you the registered patterns and their raw content:
wp eval '
$registry = WP_Block_Patterns_Registry::get_instance();
foreach ( $registry->get_all_registered() as $pattern ) {
if ( str_starts_with( $pattern["name"], "my-plugin/" ) ) {
echo $pattern["name"], "\n";
echo substr( $pattern["content"], 0, 300 ), "\n---\n";
}
}
'
If the content string is present and contains the nested block comments, the pattern is not the problem. If it is empty or contains plain HTML, stop here and fix the registration.
Layer 2: What the editor does with a pattern after insertion
The Site Editor preview is not a one-to-one render of the registered content string. The core core/pattern block wraps pattern content in a group block on the server before running do_blocks(). The relevant change in Gutenberg’s history shows the render function returning:
return do_blocks( '<!-- wp:group --><div class="wp-block-group">' . $pattern['content'] . '</div><!-- /wp:group -->' );
(Gutenberg commit 7620b99.) In the editor, the same block replaces its wrapper with a Group block containing the pattern’s blocks when the block or its inner blocks are selected. What you see in the canvas is the editor’s reconstruction of the pattern, not the raw string. A missing child in preview is therefore not automatically evidence that the pattern content is wrong — it can be evidence that the editor’s replacement step did not complete.
This matters for dynamic blocks in particular. The handbook notes that if a dynamic block uses InnerBlocks, the InnerBlocks must be saved in the save callback using <InnerBlocks.Content/> (Static or Dynamic rendering of a block). A custom block inside your pattern that renders server-side but omits <InnerBlocks.Content/> in save will look correct on the front end and empty in the editor. That is a block registration bug, not a pattern bug, and no amount of pattern editing will fix it.
Inspect the parsed blocks directly in the browser console while the Site Editor is open. The block editor data stores are exposed through wp.data:
const { select } = wp.data;
const blocks = select( 'core/block-editor' ).getBlocks();
console.log( JSON.stringify( blocks, null, 2 ) );
Find the block whose name is core/pattern or the inserted group, and inspect its innerBlocks array. If the nested blocks are present in the store but absent from the DOM, the problem is rendering, not parsing. If they are absent from the store, the pattern content or the insertion step dropped them. That distinction determines whether you keep reading here or move to Layer 3.
Layer 3: Rule out a known editor bug
There is a documented case where blocks relying on InnerBlocks templates do not render their inner content on insertion in templates, but do render after save and refresh. Gutenberg issue #71724 describes exactly this: “When inserting blocks that rely on InnerBlocks templates, the inner content is not rendered upon insertion. But saving and refreshing triggers rendering and content is rendered properly. Reproducible only in templates.” The reproduction steps name the Query Loop block: insert it in Editor > Templates, choose Start blank and a design, and observe that Pagination and No Results are missing until save and refresh. The report also names Terms Query and Product Gallery. It was closed as completed in #71811 on September 30, 2025.
Two cautions about using this as a diagnosis. First, the retrieved issue text does not establish which shipped WordPress or Gutenberg version contains the fix, so you cannot conclude from the issue alone that your install is affected or unaffected. Check your version against the Gutenberg release notes for #71811 rather than assuming. Second, the report names specific blocks; it is not evidence that every InnerBlocks-template block fails. If your pattern contains a different block, the refresh test is still the right diagnostic, but the upstream explanation may differ.
The decision tree
Run these in order. Each step eliminates a layer.
- Reproduce in the context you care about. Insert the pattern into a template in the Site Editor, not just into a post. The #71724 report says the failure is reproducible only in templates, so a post-context test can produce a false negative.
- Run the refresh test. Save the template, reload the editor. If the nested blocks appear, the pattern content and registration are almost certainly fine and the failure is editor-side rendering timing. Record the block name and your WP and Gutenberg versions, then check the issue tracker for that block before changing code.
- If refresh does not fix it, inspect the store. Use the
wp.datasnippet above. Blocks present in the store but missing from the DOM point to a block type’seditfunction or a rendering filter. Blocks absent from the store point back to the pattern content or the insertion step. - Confirm the pattern content. Run the WP-CLI command from Layer 1. If the nested block comments are missing from the registered content, the pattern is the problem regardless of what the editor does.
- Check context restrictions. If the pattern is registered with
postTypesortemplateTypes, confirm the current editor context matches. A pattern restricted tosingle-postwill not be available in a404template, and that absence can be mistaken for a rendering failure. - Check custom blocks in the pattern. For any dynamic block inside the pattern, confirm its
savecallback includes<InnerBlocks.Content/>. A block that renders correctly on the front end but empty in the editor is a registration bug in that block, not in the pattern.
What to capture before filing upstream
If the refresh test points to an editor bug and the issue tracker has no matching report for your block, the maintainers need specifics. Capture:
- WordPress version and Gutenberg plugin version, if active.
- Theme type: block, classic, or hybrid.
- The exact block name whose inner content is missing, and the pattern name.
- Whether the failure occurs in a template, a template part, or a post.
- Whether save-and-refresh resolves it.
- The output of the
wp.datastore inspection for the affected block, showing whether the inner blocks are present in the store.
That set separates “the pattern is malformed” from “the editor dropped the children” in a way a screenshot cannot. The #71724 report includes reproduction steps and environment details for the same reason; a report without them tends to be closed as unreproducible.
FAQ
Does the REST block-renderer endpoint explain this? Not in the sources reviewed for this article. The block-renderer reference was unavailable at retrieval time, and no retrieved source ties this symptom to that endpoint. Treat server-side preview rendering as a separate investigation if you have evidence pointing there.
Could a plugin or theme be causing it? Possibly, but no retrieved source supports a specific cause. The standard isolation step — deactivate plugins except the one registering the pattern and the block, switch to a default block theme, retest — is still the right way to find out, and it should come after the refresh test rather than before it.
Will changing blockTypes or inserter fix the preview? No retrieved source supports that. Those properties control where a pattern is offered, not how its nested blocks render once inserted. Changing them to work around a rendering failure moves the symptom rather than fixing it.
Why does the pattern render on the front end but not in the editor? The front end runs the server-side render path, which wraps the pattern content in a group and passes it through do_blocks(). The editor reconstructs the pattern through its own block replacement step. The two paths are not identical, which is why a front-end check is not a substitute for the Site Editor test.