File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {
1111 registerLegacyWidgetBlock ,
1212 registerLegacyWidgetVariations ,
1313} from '@wordpress/widgets' ;
14+ import { setFreeformContentHandlerName } from '@wordpress/blocks' ;
1415
1516/**
1617 * Internal dependencies
@@ -49,6 +50,12 @@ export function initialize( editorName, blockEditorSettings ) {
4950 }
5051 registerLegacyWidgetVariations ( blockEditorSettings ) ;
5152
53+ // As we are unregistering `core/freeform` to avoid the Classic block, we must
54+ // replace it with something as the default freeform content handler. Failure to
55+ // do this will result in errors in the default block parser.
56+ // see: https://github.com/WordPress/gutenberg/issues/33097
57+ setFreeformContentHandlerName ( 'core/html' ) ;
58+
5259 const SidebarControl = getSidebarControl ( blockEditorSettings ) ;
5360
5461 wp . customize . sectionConstructor . sidebar = getSidebarSection ( ) ;
Original file line number Diff line number Diff line change 44import {
55 registerBlockType ,
66 unstable__bootstrapServerSideBlockDefinitions , // eslint-disable-line camelcase
7+ setFreeformContentHandlerName ,
78} from '@wordpress/blocks' ;
89import { render } from '@wordpress/element' ;
910import {
@@ -63,6 +64,11 @@ export function initialize( id, settings ) {
6364 settings . __experimentalFetchLinkSuggestions = ( search , searchOptions ) =>
6465 fetchLinkSuggestions ( search , searchOptions , settings ) ;
6566
67+ // As we are unregistering `core/freeform` to avoid the Classic block, we must
68+ // replace it with something as the default freeform content handler. Failure to
69+ // do this will result in errors in the default block parser.
70+ // see: https://github.com/WordPress/gutenberg/issues/33097
71+ setFreeformContentHandlerName ( 'core/html' ) ;
6672 render (
6773 < Layout blockEditorSettings = { settings } /> ,
6874 document . getElementById ( id )
You can’t perform that action at this time.
0 commit comments