Plugin breaks blocks that use ServerSideRender
-
Hi!
I’ve come accross an issue with your plugin in that it breaks any block that uses the
ServerSideRendercomponent.Steps to reproduce:
1. In a brand new WordPress install use
npx @wordpress/create-blockto create a new Dynamic block.
2. In the edit.js file load up aServerSideRendercomponent.
3. Ensure that component uses theattributesparam.
4. The block will no longer render and is ‘broken’.Error message provided:
{“code”:”rest_invalid_param”,”message”:”Invalid parameter(s): attributes”,”data”:{“status”:400,”params”:{“attributes”:”tpgbDisrule is not a valid property of Object.”},”details”:{“attributes”:{“code”:”rest_additional_properties_forbidden”,”message”:”tpgbDisrule is not a valid property of Object.”,”data”:null}}}}
I have provided a link to the example block file as part of this request. Note that this issue relates to https://github.com/WordPress/gutenberg/issues/16850 in that
ServerSideRenderdoes not accept attributes that are registered to blocks via JS, it needs to be via a PHP route.As it currently stands, your plugin cannot be used on any site that has blocks relying on
ServerSideRender.Thanks in advance for your feedback on this!
The page I need help with: [log in to see the link]
The topic ‘Plugin breaks blocks that use ServerSideRender’ is closed to new replies.