Problem:
When using the example_block to create a custom Gutenberg block, I get a warning that 'editor is deprecated and I should use blockEditor instead'.

Solution:
Replace 'editor' to 'blockEditor' in index.es6.js:
line 1: const { blocks, data, element, components, blockEditor } = wp;
line 6: const { InnerBlocks, RichText, InspectorControls, PanelColorSettings, MediaUpload, BlockControls } = blockEditor;

CommentFileSizeAuthor
#4 3126344-4-2.patch2.63 KBandregp
#4 3126344-4.patch827 bytesandregp

Comments

GlarDup created an issue. See original summary.

avpaderno’s picture

Issue tags: -custom block, -deprecation warnings +deprecated
andregp’s picture

Assigned: Unassigned » andregp

I'll work on it.

andregp’s picture

Assigned: andregp » Unassigned
Status: Active » Needs review
StatusFileSize
new827 bytes
new2.63 KB

I changed the referred code and created the patch 3126344-4. Then I looked for other .js files with similar code, made the same changes on them and created the patch 3126344-4-2 with all changes.

Matheus Macario’s picture

Assigned: Unassigned » Matheus Macario
Matheus Macario’s picture

Assigned: Matheus Macario » Unassigned
Status: Needs review » Reviewed & tested by the community

I did the review and these were the steps performed :
- Installed module
- Applied the 3126344-4-2 patch.
- Code review on changes and double checked for others js files that might be whit the same issue
- reviewed again, and nothing wrong was found.

marcofernandes’s picture

Version: 8.x-1.10 » 8.x-2.x-dev

@andregp Thank you for the fixes. Can you confirm the patch should be applied to 8.x-2.x? The issue is tagged for 8.x-1.10.

andregp’s picture

@marcofernandes oh sorry, yes it is for the 8.x-2.x version.

marcofernandes’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.