Conflict with Pods Framework Blocks in Gutenberg Editor
-
Hello,
after updating Widget Option plugin to v4 we started experiencing problems with blocks in the Gutenberg visual editor, specifically Pods framework’s blocks.
Blocks already present in pages are correctly rendered on the frontend, but when editing the page in the backend they refuse to show, giving this error message: “This block has encountered an error and cannot be previewed”. Furthermore, all options for the block disappear from the sidebar, making it unusable.
Same goes when trying to add new Pod blocks to the page.Inspecting the browser’s console I can see a React error: “Objects are not valid as a React child” plus many ajax calls resulting in 400 http response. Those calls state “rest_invalid_param” and something about “extended_widget_opts_state” being a “not valid property of Object”.
I experienced the same problem when trying to develop a custom gutenberg block from scratch, using npm’s wordpress/create-block, I sistematically ended up getting the same error. In order to bypass this, I had to declare 2 more attributes in my “block.json” file, “extended_widget_opts_state” and “extended_widget_opts_clientid” (which, evidently, belong to Widget Options plugin).
Please note, I already tried to disable Widget Options guttenberg’s integration from the plugin settings, but it still gives the error (the 2 above mentioned “foreign” attributes are still showing up).When entirely disabling the Widget Options plugin (from WP’s plugin page), the problem disappears and both Pods blocks and my custom blocks work correctly.
Please, how can I solve this?
Thanks in advance.
- The topic ‘Conflict with Pods Framework Blocks in Gutenberg Editor’ is closed to new replies.