• Hi there,
    I’m one of the developers of the LifterLMS plugin.
    One of our customers reported an issue with the Advanced Columns block and our Course custom post type (you can see it here).
    Basically when changing the Advanced Columns block number of columns the Course content, in the block editor, reverted to the default, as specified in the 'template' cpt property.
    I’ve investigated into this and found the same happens, presumably, with whatever custom post type having the template property set.
    As proof of concept you can try this snippet (that you can also find here):

    
    add_action(
    	'init',
    	function() {
    		register_post_type(
    			'movies',
    			array(
    				'labels'       => array(
    					'name'          => 'Movies',
    					'singular_name' => 'Movie',
    				),
    				'public'       => true,
    				'has_archive'  => true,
    				'rewrite'      => array( 'slug' => 'movies' ),
    				'show_in_rest' => true,
    				'template'     => array(
    					array(
    						'core/heading',
    						array(
    							'content'   => 'Whatever',
    							'level'     => 3,
    							'textAlign' => 'center',
    						),
    					),
    				),
    			)
    		);
    	}
    );
    

    Then:
    – create a new Movie
    – delete the default h3, to better appreciate the issue
    – publish
    – add an Advanced Columns block
    – select the number of columns
    you’ll see the content reverted to the default template.

    Could you please look into this?
    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • 2scoops

    (@2scoops)

    Hey,

    Thanks for looking into this Rocco, I am the person who addressed this problem to Lifter LMS so it would be great to have a fix for this pretty soon.

    Thanks all
    Byron

    Plugin Contributor Ryan Kienstra

    (@ryankienstra)

    Hi @d4z_c0nf,
    Thanks a lot for your code snipped and detailed steps to replicate. I also see this, and it looks like a bug with Genesis Blocks.

    @2scoops, thanks for raising this, also.

    I opened a PR for Genesis Blocks to fix this, though I can’t commit to a date for when it’ll be deployed.

    Thanks for your patience.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Issue with Advanced Columns block and Custom Post Type with block template’ is closed to new replies.