Row + Gutenberg template = white edit screen
-
Hi!
I’m currently experiencing a bit of a headache when it comes to integrating a coblocks row into a Gutenberg editor template for a custom post type. I can create and post a new post with the custom post type, but when I try to edit the post I get a white screen.The error message on the console is “Block validation: Block validation failed for
coblocks/row
“.The code for the custom post type and template is as follows:
function myplugin_register_project_post_type() { $args = array( 'public' => true, 'label' => 'Projects', 'show_in_rest' => true, 'template' => array( array( 'coblocks/row', array( "columns" => '2', "layout" => '75-25', ), array( array( 'coblocks/column', array( 'width' => '75',), array( array( 'metaslider/slider', array() ), ) ), array( 'coblocks/column', array( 'width' => '25',), array( array( 'core/heading', array( 'placeholder' => 'Prosjektnavn', ) ), array( 'acf/prosjektinfo', array() ), array( 'core/paragraph', array( 'placeholder' => 'Prosjektbeskrivelse' ) ), ), ) ) ) ) ); register_post_type( 'project', $args ); } add_action( 'init', 'myplugin_register_project_post_type' );
Any help with solving this would be greatly appreciated. I’ve tried downgrading to version 1.12.0 to no avail.
Kind regards
PS: here’s the code editor view of the “new post”:
<!-- wp:coblocks/row {"columns":"2","layout":"75-25","coblocks":{"id":"818214516456"}} --> <div class="wp-block-coblocks-row coblocks-row-818214516456" data-columns="2" data-layout="75-25"><div class="wp-block-coblocks-row__inner has-medium-gutter has-no-padding has-no-margin is-stacked-on-mobile"><!-- wp:coblocks/column {"width":"75","coblocks":{"id":"818214516507"}} --> <div class="wp-block-coblocks-column coblocks-column-818214516507" style="width:75%"><div class="wp-block-coblocks-column__inner has-no-padding has-no-margin"><!-- wp:metaslider/slider /--></div></div> <!-- /wp:coblocks/column --> <!-- wp:coblocks/column {"width":"25","coblocks":{"id":"818214516530"}} --> <div class="wp-block-coblocks-column coblocks-column-818214516530" style="width:25%"><div class="wp-block-coblocks-column__inner has-no-padding has-no-margin"><!-- wp:heading {"placeholder":"Prosjektnavn"} --> <h2></h2> <!-- /wp:heading --> <!-- wp:acf/prosjektinfo {"id":"block_5d82894c561be","name":"acf/prosjektinfo","align":"","mode":"preview"} /--> <!-- wp:paragraph {"placeholder":"Prosjektbeskrivelse"} --> <p></p> <!-- /wp:paragraph --></div></div> <!-- /wp:coblocks/column --></div></div> <!-- /wp:coblocks/row -->
edit: have tested also with regular posts and templating with the same result, using coblocks row in a non-template context works just fine with editing etc.
- The topic ‘Row + Gutenberg template = white edit screen’ is closed to new replies.