Custom Block Crashing Block Editor
-
I’ve developed a custom block for the new editor and it works fine with WP 4.9.8 and the Gutenberg plugin v4.1, but when I try it on WP v5.0 (b1 or b2) I get a white screen when I try to edit any post and a bunch of JS errors. If I remove the custom block, the editor works normally in WP5.0. So something has changed while moving from Gutenberg to WP 5.0 that causes issues with my custom block, but I am not familiar enough with all this new JS to debug it. Only one of the errors is connected to my plugin code (conference-scheduler.build.js) and I can’t see why it is an issue looking at the code. The errors are (WP 5.0b2-43845):
[Error] TypeError: undefined is not an object (evaluating ‘xe.parse’)
(anonymous function) (blocks.min.js:2:121539)
r (blocks.min.js:1:149)
(anonymous function) (blocks.min.js:1:945)
Global Code (blocks.min.js:1:955)
[Error] TypeError: undefined is not an object (evaluating ‘wp.blocks.setCategories’)
Global Code (post.php:94)
[Log] JQMIGRATE: Migrate is installed, version 1.4.1 (jquery-migrate.min.js, line 2)
[Error] ReferenceError: Can’t find variable: regeneratorRuntime
(anonymous function) (api-fetch.min.js:1:3675)
(anonymous function) (api-fetch.min.js:1:4521)
r (api-fetch.min.js:1:151)
(anonymous function) (api-fetch.min.js:1:947)
Global Code (api-fetch.min.js:1:957)
[Error] TypeError: undefined is not an object (evaluating ‘wp.apiFetch.use’)
Global Code (post.php:104)
[Error] ReferenceError: Can’t find variable: regeneratorRuntime
(anonymous function) (core-data.min.js:1:5301)
n (core-data.min.js:1:151)
(anonymous function) (core-data.min.js:1:947)
Global Code (core-data.min.js:1:957)
[Error] ReferenceError: Can’t find variable: regeneratorRuntime
(anonymous function) (notices.min.js:1:4338)
r (notices.min.js:1:150)
(anonymous function) (notices.min.js:1:1564)
r (notices.min.js:1:150)
(anonymous function) (notices.min.js:1:1408)
r (notices.min.js:1:150)
(anonymous function) (notices.min.js:1:946)
Global Code (notices.min.js:1:956)
[Error] ReferenceError: Can’t find variable: regeneratorRuntime
(anonymous function) (editor.min.js:55:46011)
(anonymous function) (editor.min.js:55:46941)
n (editor.min.js:1:149)
(anonymous function) (editor.min.js:1:945)
Global Code (editor.min.js:1:955)
[Error] TypeError: undefined is not an object (evaluating ‘wp.blocks.registerBlockType’)
(anonymous function) (conference-scheduler.build.js:18:30151)
n (conference-scheduler.build.js:1:162)
(anonymous function) (conference-scheduler.build.js:18:33666)
n (conference-scheduler.build.js:1:162)
(anonymous function) (conference-scheduler.build.js:1:573)
Global Code (conference-scheduler.build.js:1:582)
[Error] TypeError: Object($.withColors) is not a function. (In ‘Object($.withColors)(“backgroundColor”,{textColor:”color”})’, ‘Object($.withColors)’ is an instance of Object)
(anonymous function) (block-library.min.js:12:10156)
n (block-library.min.js:1:155)
(anonymous function) (block-library.min.js:1:951)
Global Code (block-library.min.js:1:961)
[Error] TypeError: undefined is not an object (evaluating ‘Object(u.select)(“core/editor”).getBlockSelectionStart’)
(anonymous function) (edit-post.min.js:12:18838)
Fe (edit-post.min.js:12:16765)
INIT (edit-post.min.js:12:18787)
(anonymous function) (edit-post.min.js:12:66919)
(anonymous function) (edit-post.min.js:12:19794)
n (edit-post.min.js:1:151)
(anonymous function) (edit-post.min.js:1:947)
Global Code (edit-post.min.js:1:957)
[Error] TypeError: undefined is not an object (evaluating ‘wp.editPost.initializeEditor’)
(anonymous function) (post.php:1664)
- The topic ‘Custom Block Crashing Block Editor’ is closed to new replies.