Errors in block editor after latest update
-
Hello, love the plugin, but after rolling out the latest version on two different sites, with different configurations, one a multisite and one a single WP site, we’ve have editors experiencing numerous problems after editing existing blocks in existing content (page content, and custom post types)
Steps to repro:
- open an existing page or cpt in the block editor
- edit some text content
- An error will appear on some other blocks *while editing* and not the block being edited – the error is not always the same – they consist of the following:
“This block has encountered an error and cannot be previewed”
Sometimes the blocks will edit correctly with no errors, but then the following error will appear for every image, after modifying unrelated blocks, and then updating and reloading the editor.
“This block contains unexpected or invalid content”
Here are the errors that appear in the Javascript console:
Failed to load resource: the server responded with a status of 403 () /wp-json/wp/v2/visibility_preset?context=edit&per_page=100&lang=en&is_block_editor=true&_locale=user // return data from ajax: {"code":"rest_forbidden_context","message":"Sorry, you are not allowed to edit posts in this post type.","data":{"status":401}}
Also, in the console:
TypeError: Cannot read properties of null (reading 'length') at kn (block-visibility-editor.js?ver=c3279e8a7d1af51827d4:39:4780) at St (react-dom.min.js?ver=18:1:47627) at yr (react-dom.min.js?ver=18:1:56442) at $s (react-dom.min.js?ver=18:1:121443) at Sl (react-dom.min.js?ver=18:1:88649) at kl (react-dom.min.js?ver=18:1:88577) at bl (react-dom.min.js?ver=18:1:88440) at sl (react-dom.min.js?ver=18:1:85264) at dl (react-dom.min.js?ver=18:1:85651) at Nn (react-dom.min.js?ver=18:1:32464)
We utilize core capabilities to restrict access to these users, however the issue seems to be related directly to the new version of Block Visibility – this is determined by the fact that when I roll back the Block Visibility plugin to
3.0.4
(or disable it completely) the errors cease and cannot be reproduced anymore.Can you please review and let me know if you are able to recreate? If you need further detailed information regarding other plugins installed and environment, or access to a staging site to reproduce the error, can you please provide me an email address to contact you directly, as I am not authorized to publish those publicly.
Thanks for your work on this great plugin, and your consideration to this pressing matter – in the meantime, we will be rolling back and ‘freezing’ the plugin updates to the previous version, until we can resolve these issues.
- The topic ‘Errors in block editor after latest update’ is closed to new replies.