Not compatible witch Gutenberg 3.5.0
-
Hi, It doesn’t work with current Gutenberg.
When editing a post, I see an error in the console:
[Show/hide message details.] TypeError: InspectorControls is undefined[Learn More] block.build.js:121:5
<anonymous>
https://test03.localhost/wp-content/plugins/cf-7-gutenberg/block-esnext/block.build.js:121:5
__webpack_require__
https://test03.localhost/wp-content/plugins/cf-7-gutenberg/block-esnext/block.build.js:20:12
<anonymous>
https://test03.localhost/wp-content/plugins/cf-7-gutenberg/block-esnext/block.build.js:72:77
__webpack_require__
https://test03.localhost/wp-content/plugins/cf-7-gutenberg/block-esnext/block.build.js:20:12
<anonymous>
https://test03.localhost/wp-content/plugins/cf-7-gutenberg/block-esnext/block.build.js:63:18
<anonymous>
https://test03.localhost/wp-content/plugins/cf-7-gutenberg/block-esnext/block.build.js:1:11In your file
cf-7-gutenberg/trunk/block-esnext/components/Editor.js
on line 8,
InspectorControls
gets imported from
wp.blocks
.
Since Gutenberg 3.1.0 all components fromwp.blocks
are moved to
wp.editor
.
-> so change line 8 to:const {InspectorControls} = wp.editor;
More about gutenberg deprecated features https://www.ads-software.com/gutenberg/handbook/reference/deprecated/#3-7-0
… In 3.7.0wp.components.withAPIData
will be removed. Use the Core Data module or wp.apiFetch directly instead.
Thanks a lot
- The topic ‘Not compatible witch Gutenberg 3.5.0’ is closed to new replies.