diff --git a/packages/edit-navigation/src/store/actions.js b/packages/edit-navigation/src/store/actions.js index b105f7b32ce0c6..9d2d6e7e04a0b0 100644 --- a/packages/edit-navigation/src/store/actions.js +++ b/packages/edit-navigation/src/store/actions.js @@ -204,7 +204,22 @@ const batchInsertPlaceholderMenuItems = ( navigationBlock ) => async ( { const batchUpdateMenuItems = ( navigationBlock, menuId ) => async ( { registry, } ) => { - const updatedMenuItems = blocksTreeToAnnotatedList( navigationBlock ) + const allMenuItems = blocksTreeToAnnotatedList( navigationBlock ); + const unsupportedMenuItems = allMenuItems + .filter( ( { block } ) => ! isBlockSupportedInNav( block ) ) + .map( ( { block } ) => block.name ); + if ( unsupportedMenuItems.length ) { + window.console.warn( + sprintf( + // translators: %s: Name of block (i.e. core/legacy-widget) + __( + 'The following blocks haven\'t been saved because they are not supported: "%s".' + ), + unsupportedMenuItems.join( '", "' ) + ) + ); + } + const updatedMenuItems = allMenuItems // Filter out unsupported blocks .filter( ( { block } ) => isBlockSupportedInNav( block ) ) // Transform the blocks into menu items