diff --git a/packages/editor/src/store/actions.js b/packages/editor/src/store/actions.js index f9b3b64ea1fc11..768a9d9ac154cf 100644 --- a/packages/editor/src/store/actions.js +++ b/packages/editor/src/store/actions.js @@ -172,7 +172,10 @@ export function* setupEditor( post, edits, template ) { // Apply a template for new posts only, if exists. if ( template ) { - blocks = synchronizeBlocksWithTemplate( blocks, parse( template.post_content ) ); + blocks = synchronizeBlocksWithTemplate( + blocks, + template.post_content ? parse( template.post_content ) : template + ); } yield resetPost( post ); @@ -480,7 +483,7 @@ export function* savePost( options = {} ) { ); const template = ( yield select( STORE_KEY, 'getEditorSettings' ) ).template; - if ( template ) { + if ( template && template.post_content ) { yield apiFetch( { path: `/wp/v2/${ template.post_type }/${ template.ID }`, method: 'PUT',