-
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
Can't save changes when having more than 25 blocks in a Widgets area #33579
Comments
Source - https://make.wordpress.org/core/2020/11/20/rest-api-batch-framework-in-wordpress-5-6/ |
We have two ways of proceeding here:
In both cases there's a risk of data corruption if the processing stops in the middle. That being said, scaling the batch size up can only take us so far. Even if we set it to 1000, it is possible to have 1001 requests to process. We still need a reusable way of handling the overflowing requests. So essentially we need to implement point 2 above. Technically, we would send On the scale of WordPress I am sure that data corruption will still happen in at least some cases, so we also need a way of handling that. This could be as simple as communicating what happened and listing steps to fix the problem, but it would mean that some sites are in a broken state at least some of the time. To avoid that, we'd need to update widgets using something like customizer changesets – nothing is published until all the changes reach the server with a valid 200-ish response. I much prefer that latter scenario as it wouldn't leave any site in a broken state. |
Didn't we have sub batching implemented at some point? It seems like it might've been lost in one of the refactors. I'm fine with increasing the batch size, it was a fairly arbitrary number, but we have to keep in mind that the batch limit isn't currently per endpoint type, it's global. So I'd prefer to be conservative. |
We still need a general solution, but we can improve the situation by only batching requests for the widgets that were updated. Currently we always sent |
In what way? The sidebars endpoint contains a |
I'll look into this. I might have accidentally blown it away in #28210. |
I got confused there – thank you for clarifying @TimothyBJacobs! Sounds like we're good to only POST about the updated widget instances then. |
Description
WordPress 5.8. When having more than 25 blocks in a widgets area, including "Inactive widgets", can't save changes. When updating got the error:
There was an error. Invalid parameter(s): requests
.In console:
Step-by-step reproduction instructions
Expected behaviour
The changes must be saved
Actual behaviour
Changes can't be saved
WordPress information
Device information
The text was updated successfully, but these errors were encountered: