Describe the bug
When creating a post that uses 'template_lock'=>'all' and contains InnerBlocks with templateLock={false}, everything works as it should (top level of the template is locked, but InnerBlock sections are unlocked). But after adding content to those InnerBlocks using the editor, next time you edit that post, Gutenberg prompts, "The content of your post doesn’t match the template assigned to your post type."
To Reproduce
Steps to reproduce the behavior:
- Make a custom post type with a template defined:
register_post_type( 'test', array(
'label' => 'Test',
'public' => true,
'show_in_rest' => true,
'template' => array(
array( 'test/test_block', array(), array() ),
),
'template_lock' => 'all'
) );
- registerBlockType
registerBlockType( 'test/test_block', {
// usual code here
edit( { className } ) {
return (
<div className={ className }>
<InnerBlocks templateLock={ false } />
</div>
);
},
save() {
return (
<div>
<InnerBlocks.Content />
</div>
);
}
}
- In the WordPress admin, create a new post of this post type, put anything inside the block that's on this page, and publish the post.
- Refresh the post edit page (or leave this page and navigate to it again) and you'll see this error:

Expected behavior
I think there isn't supposed to be an error, but I'm not sure. I can't find this specific issue mentioned anywhere, so I could easily just be doing something wrong, but I can't figure out what it is. If it is user error, then I'm sorry for the trouble.
Additional context
- Gutenberg 4.2.0
- Wordpress 4.9.8
Describe the bug
When creating a post that uses 'template_lock'=>'all' and contains InnerBlocks with templateLock={false}, everything works as it should (top level of the template is locked, but InnerBlock sections are unlocked). But after adding content to those InnerBlocks using the editor, next time you edit that post, Gutenberg prompts, "The content of your post doesn’t match the template assigned to your post type."
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I think there isn't supposed to be an error, but I'm not sure. I can't find this specific issue mentioned anywhere, so I could easily just be doing something wrong, but I can't figure out what it is. If it is user error, then I'm sorry for the trouble.
Additional context