ying
(@yingscarlett)
Hi there!
Yes, GeneratePress is compatible with the latest WordPress. The 6.5 on the theme page is the minimum version GP requires, not the latest one it supports.
The “Invalid JSON response” when saving widgets comes from the WordPress REST API request the widget editor makes (/wp-json/wp/v2/widgets). The theme isn’t involved in that request. To narrow it down, could you try:
- Temporarily switch to a default theme like Twenty Twenty-Five and try saving the widget. If it still fails, the theme isn’t the cause.
- Deactivate your plugins, then reactivate them one by one, especially security, caching and optimization plugins.
- Check Tools > Site Health for any REST API errors.
- Open your browser’s developer tools, go to the Network tab, save the widget, and look at the response of the failed request. It usually shows the real error, like a PHP error or a firewall block.
Let me know what you find!
I’ve tried all of the above, except the network console. The network console has the following error: Failed to load resource: the server responded with a status of 403 () https://[mysite]/wp-json/batch/v1?_locale=user
ying
(@yingscarlett)
Since you’ve tried switching themes, can you confirm it works when using twenty twenty-five theme?
Thanks for the console details. A 403 on /wp-json/batch/v1 means something on the server is blocking that request. It usually isn’t GeneratePress. Most often it’s a security plugin or firewall (Wordfence, Cloudflare or your host’s firewall) or a REST API restriction.
Please try temporarily disabling your security plugin or firewall rules for the REST API. If you’re on Cloudflare, check its firewall events. Then reload the editor. If it still happens, ask your host to check the server error log for the 403.
-
This reply was modified 6 days, 14 hours ago by
ying.
I’ve narrowed it down. The problem occurs only in the widget which is placed in the footer Widget 1 area. In this widget I have a gallery block. I get the error when editing and saving the block.
If I add a gallery block directly to a post or page, all works fine.
I can’t test this with a standard WP theme, since they either don’t support widgets or don’t support blocks in widgets.
ying
(@yingscarlett)
I can not replicate the issue on my end. I tried adding the gallery block to footer widget 1, but it was saved successfully.
Can you disable all plugins to test?
I’ve figured it out: if you go to Appearance > Widgets > Footer 1 widget and edit the gallery block there, the error occurs. If you go to Appearance > Themes and edit the widget / block in the theme editor, then it works as expected. So it seems that after the WP 7.1.3 update editing the widget directly, outside the theme editor, json requests seem to be blocked.