-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<ServerSideRender /> component does not support blocks with lots of attributes #16396
Comments
Perhaps the component could support a But that would require a change to |
+1
Here is my use case. I am in the middle of creating a Coming from the view point of page builders like Elementor and divi where an elementor/divi module supports a lot of UI options like typography, border, border radius etc. If we want to create equivalent blocks we will have a lot of attributes. Combined with the necessity to do a ServerSideRender (for example building an gutenberg block on top of a third party shortcode), using |
Hey any update on this? We need to use the ServerSideRender component for a block but can't since our data for it exceeds our apache url limit. Ideally we really don't want to update that apache setting. |
POST
requests in endpoint for ServerSideRender
block component
WordPress/wordpress-develop#196
This now seems to be more of an enhancement request rather than a help request so relabeling and retitling. |
Seems like this was fixed a while ago in #21068 |
Is your feature request related to a problem? Please describe.
When using the
<ServerSideRender />
component to render a block and pass in a lot of attributes to the attributes prop of the component, the render request fails due to the request query having too many characters.There are two scenario's where this happens for me. The first one is (sort of) a bug in my opinion. When writing a long paragraph that contains (+-) over 2000 characters it will fail. I think having a paragraph that is 2000 characters long is not a very common use case, but it happens.
Second scenario, which has more to do with my specific usage, is that i also pass all the names and attributes of all innerBlocks to the
<ServerSideRender />
component. This because during editing in the editor and server side rendering, the$content
variable is an empty string. I do however need to render the innerBlocks content inside the server side rendered block. In this case adding a couple of innerBlocks to a block pretty quickly reaches the character limit, which results in the server side render request failing. I know this is not how the<ServerSideRender />
component is supposed to be used, but i don't see a better solution to render the innerBlocks inside the server side rendered block.Describe the solution you'd like
A solution to this would be using POST instead of GET requests to render the block with the
<ServerSideRender />
component. This way the attributes can be placed in the body of the request which eliminates the GET url request character limit (is this a WordPress limit?)Describe alternatives you've considered
At the moment i can't think of any other solutions to solve this in an easy manner.
The text was updated successfully, but these errors were encountered: