This is a known issue.
A hack would be to disable to the validation completely for the block.
Chris Van Patten provided the following code example:
/**
* WordPress dependencies
*/
import { compose } from '@wordpress/compose';
import { withDispatch } from '@wordpress/data';
import { InnerBlocks } from '@wordpress/editor';
/**
* Container block
*
* @return {Object}
*/
const Editor = () => (
<InnerBlocks templateLock={ false } />
);
// This is a hack which forces the template to appear valid.
// See https://github.com/WordPress/gutenberg/issues/11681
const enforceTemplateValidity = withDispatch( ( dispatch, props ) => {
dispatch( 'core/block-editor' ).setTemplateValidity( true );
} );
export default compose(
enforceTemplateValidity,
)( Editor );
Related Posts:
- Gutenberg & Pre-formatted Templates: Core Block Attributes
- How does wordpress blocks?
- How to replace WordPress sidebars (widget areas) with Gutenberg
- How do you override Post template when using Query Loop block?
- How to custom page template for the Gutenberg editor
- Use PHP templates as blocks
- Can I add a default Block to my custom theme?
- Is there a way to create a block template that is not limited to a post type?
- Can you use block patterns in block templates or insert them programmatically?
- Change default template in the block editor (Gutenberg)
- How to limit block activity (insertion/deletion) to inside of a Block Template on the Admin Screen?
- templates page not showing on gutenberg editor
- Category theme template becomes default template for child theme
- Adding new Template Parts in the Block Editor when using Classic Themes
- How can i change email template for new user
- Enable page templates. How?
- Is it possible to override the result of get_template_part()?
- Prevent comments_template() to load comments.php
- Page editor missing Templates drop down
- How to check if a shortcode exists?
- Custom templates folder
- How to Rename a Template File?
- get page templates
- Creating a custom category page with pagination
- Modifying searchform.php and search.php to have two kinds of searches
- Change site template from php
- Passing variables to template parts
- Display HTML only if Custom Field has a Value
- Get templated page/post content via the WordPress API
- Force all images to full size in page template
- Login WordPress website using wp-rest api
- how to create template path for external (include) .js file
- Global variable set in the template’s header.php is unable to echo in footer.php
- How to Increment ID value within ACF Repeater Field Loop
- When a link doesn’t exist, how to tell WordPress what to do? (404 Error Page)
- WordPress Schema.org Markup. What value does it add?
- home.php not loading
- get_search_link() redirects to 404 template page
- How to get the most recent modified date of anything in the footer of my site?
- the_excerpt producing empty output
- New custom nev not working [closed]
- How do I insert JS tracking code to a page with the WP editor?
- LaTeX for WordPress strips codes in loop
- How to remove the Template drop down, but keep Parent and Order
- Search results when none found – stay on page they were on
- Include Lumen/Laravel app in custom WordPress template
- Rewrite Rules to custom template
- Unable to display pagination links on custom category template
- How do I override the search template in a plugin?
- Is there any way to write custom HTML is some .php file and then call it wherever necessary?
- How to redirect my custom template page to content-none.php if no posts found?
- Get URL of current post but not the page number
- Is template name always same as directory name?
- Single Post Breadcrumb not linking back to Custom Post Type Index?
- Form post to WordPress page = wrong template
- get_month_link uses what wordpress template?
- Load custom script on a single template
- Archive template limiting to 4 entries?
- Author template help. How to check if field exists in the profile?
- Can’t split the_title() by white space
- WP redirect to custom login page if a user is not logged in
- How to render a block from php template
- How do I create post template for different taxonomy
- Ip2location plugin in my template header?
- Pagination issue with tag.php
- Import a header template from another theme
- Will placing custom templates in sub directory break any native WordPress functionality
- Archive-custome_post.php template not working
- Change “posts per page” depending on width
- How to slice down index.php from a template and import from another file?
- Blog page won’t show Blog template
- Can index.php take over for front-page.php in template hierarchy on second page?
- What filter or action hook to use in order to load some code before the template begins printing in BuddyPress? [closed]
- How can I abstract code out of a template by using functions.php
- How to set up page fields with gutenberg instead of ACF
- How do I get tags linking to proper pages (/tag/sample-tag -> pages with that tag)
- How to name custom search page PHP file?
- get_template_part for template in subdirectory not working
- Assign template to custom page type?
- Accidentally deleted code in header.php
- Custom post template
- Main content not displaying using custom page template
- plugin overwrites other plugin’s archive-.php file
- Creating custom URLs with template to fetch external JSON
- How can I display a list of pages and the template used by each?
- Templates for Mobile Site
- Where is search.php?
- Including Custom Template on template_include Filter not working
- Is it possible to return a specific tag archive/template as one of the search results?
- Show a custom template, no matter the page being viewed, if the user is not logged in
- A page created with url of blog redirects to the posts page, how do I stop this?
- WordPress templates bug
- Taxonomy Parent not showing up in address bar
- printf, translation and the_author_posts_link()
- wp e-commerce single-product template giving 404
- Strange Behavior of Page Template Dropdown
- WordPress Template works until page becomes a child
- WordPress -> PHPBB look a like
- How to change post template
- How to create a template for a post in Query Loop block?