Title: Custom block type problem
Last modified: October 23, 2018

---

# Custom block type problem

 *  [Jacob N. Breetvelt](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/custom-block-type-problem/)
 * 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)

 *  [wpweaver](https://wordpress.org/support/users/wpweaver/)
 * (@wpweaver)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/custom-block-type-problem/#post-10807221)
 * 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](https://wordpress.org/support/users/opajaap/)
 * (@opajaap)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/custom-block-type-problem/#post-10807679)
 * 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….
 *  [Colleen Brady](https://wordpress.org/support/users/77586-1/)
 * (@77586-1)
 * [7 years, 7 months ago](https://wordpress.org/support/topic/custom-block-type-problem/#post-10807816)
 * 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](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.

 * ![](https://ps.w.org/gutenberg/assets/icon-256x256.jpg?rev=1776042)
 * [Gutenberg](https://wordpress.org/plugins/gutenberg/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/gutenberg/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/gutenberg/)
 * [Active Topics](https://wordpress.org/support/plugin/gutenberg/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/gutenberg/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/gutenberg/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [Colleen Brady](https://wordpress.org/support/users/77586-1/)
 * Last activity: [7 years, 7 months ago](https://wordpress.org/support/topic/custom-block-type-problem/#post-10807816)
 * Status: not resolved