• Pls tell me what i am doing wrong:

    My custom block types save function:
    (the var props.attributes.shortcode contains: ‘[photo 5594]’)

    
    save: 	function( props ) {
    			var shortcode = props.attributes.shortcode || '';
    
    			if ( shortcode.length ) {
    				return el( 'p', null, shortcode );
    			}
    		},
    

    The content of the page in the classic editor is:

    
    <!-- wp:wppa/gutenberg-photo -->
    <p class="wp-block-wppa-gutenberg-photo">[photo 5594]</p>
    <!-- /wp:wppa/gutenberg-photo -->
    

    So far it works, but re-editing the post produces the error:
    This block contains unexpected or invalid content.

    Clicking the resolve button he wants to change:

    
    Current
    <p class="wp-block-wppa-gutenberg-photo">[photo 5594]</p>
    

    into:

    
    After Conversion
    <p class="wp-block-wppa-gutenberg-photo">[photo 5594]</p>
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • Did this just start in 4.0.0?

    My plugin has a similar issue – can create it, but not re-edit. This has worked fine since March or so, but broke with 4.0.0. I think they did something related to the save procedure.

    I have found the same with some other GB plugins, but some still work.

    I think this must be a really major issue.

    Thread Starter Jacob N. Breetvelt

    (@opajaap)

    No, it never worked. I spent a week or so on it amonth ago, and today i gave it another try, with the new version. The only change is the text of the errormessage….

    Started seeing the error “This block contains unexpected or invalid content. Resolve.” last night. Screenshots and more detail in this GitHub post: https://github.com/WordPress/gutenberg/issues/10848#issuecomment-432082547

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Custom block type problem’ is closed to new replies.