Compatibility with WordPress 6.0 and earlier is broken.
-
CoBlocks v3.1.0 with WordPress v6.0.5 raises error below.
Fatal error: Uncaught TypeError: strpos(): Argument #1 ($haystack) must be of type string, array given in wp-includes/blocks.php:20 Stack trace: #0 wp-includes/blocks.php(20): strpos(Array, 'file:') #1 wp-includes/blocks.php(84): remove_block_asset_path_prefix(Array) #2 wp-includes/blocks.php(316): register_block_script_handle(Array, 'editorScript') #3 wp-includes/blocks.php(391): register_block_type_from_metadata('...', Array) #4 wp-content/plugins/coblocks/includes/class-coblocks-register-blocks.php(189): register_block_type('...', Array) #5 wp-includes/class-wp-hook.php(307): CoBlocks_Register_Blocks->register_blocks('') #6 wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #7 wp-includes/plugin.php(476): WP_Hook->do_action(Array) #8 wp-settings.php(598): do_action('init') #9 wp-config.php(100): require_once('...') #10 wp-load.php(50): require_once('...') #11 wp-blog-header.php(13): require_once('...') #12 index.php(17): require('...') #13 {main} thrown in wp-includes/blocks.php on line 20
WordPress v6.0.5 does not support array value for
editorScript
inblock.json
. It’s supported from WordPress v6.1.WordPress v6.0’s register_block_script_handle() https://github.com/WordPress/WordPress/blob/6.0-branch/wp-includes/blocks.php#L83
WordPress v6.1’s register_block_script_handle() https://github.com/WordPress/WordPress/blob/6.1-branch/wp-includes/blocks.php#L98
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Compatibility with WordPress 6.0 and earlier is broken.’ is closed to new replies.