• 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.

    • This topic was modified 5 years, 2 months ago by coruscation.
    • This topic was modified 5 years, 2 months ago by coruscation.
Viewing 1 replies (of 1 total)
  • Plugin Author Anthony Ledesma

    (@paranoia1906)

    Hi @coruscation,

    Sorry for the delayed response in getting back to you. I considered your request for a bit and experimented a bit but hadn’t made progress.

    Our development team has released version 1.15 of CoBlocks which has resolved a number of issues that had been present in previous versions. Please see if the issue still exists when you update to the latest version of CoBlocks.

    If you are still able to reproduce errors, then please provide to me the markup provided in your developer console.

    “Block validation: Block validation failed for coblocks/row “ would generally be followed with something like: Expected markup: {…} Received markup: {…}

    The markup difference will help us to identify where the break is coming in. My initial thought is that the Row block is expecting an additional attribute.

    Best regards,

    Anthony

Viewing 1 replies (of 1 total)
  • The topic ‘Row + Gutenberg template = white edit screen’ is closed to new replies.