You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have created a block that is rendered server side. This block is quite customisable and therefore has a lot of attributes. This works fine until I change too many attributes at which point the block displays "This block has encountered an error..." when editing in the block editor.
It looks as though server side blocks are rendered via this url endpoint "/wp-json/wp/v2/block-renderer/block/name" and the attributes are appended to the end of it. This endpoint returns a "414 Request-URI Too Long" if too many attributes are added.
Obviously I can change my server settings to make this work but I don't want the users of my plugin to have to go through this process. Am I missing a simple way around this without having to change server settings?
I think a simple fix would be to make the request to "/wp-json/wp/v2/block-renderer/block/name" within the block editor a POST instead of GET, this way it wouldn't matter how many attributes are added.
Any help on this would be much appreciated.
Step-by-step reproduction instructions
Visit the "/wp-json/wp/v2/block-renderer/block/name?context=edit&attributes=" endpoint (change block/name for your own block), then add a really long string to the end of the attributes.
Screenshots, screen recording, code snippet
No response
Environment info
Using the latest versions of WordPress 6.0.1
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered:
Description
I have created a block that is rendered server side. This block is quite customisable and therefore has a lot of attributes. This works fine until I change too many attributes at which point the block displays "This block has encountered an error..." when editing in the block editor.
It looks as though server side blocks are rendered via this url endpoint "/wp-json/wp/v2/block-renderer/block/name" and the attributes are appended to the end of it. This endpoint returns a "414 Request-URI Too Long" if too many attributes are added.
Obviously I can change my server settings to make this work but I don't want the users of my plugin to have to go through this process. Am I missing a simple way around this without having to change server settings?
I think a simple fix would be to make the request to "/wp-json/wp/v2/block-renderer/block/name" within the block editor a POST instead of GET, this way it wouldn't matter how many attributes are added.
Any help on this would be much appreciated.
Step-by-step reproduction instructions
Visit the "/wp-json/wp/v2/block-renderer/block/name?context=edit&attributes=" endpoint (change block/name for your own block), then add a really long string to the end of the attributes.
Screenshots, screen recording, code snippet
No response
Environment info
Using the latest versions of WordPress 6.0.1
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: