Updating failed. The response is not a valid JSON response.
-
I started receiving this error on some, but not all of my pages when I tried to edit them. After some experimentation I found, for me, the error is caused by the amount of content of the page. The trigger for me was exactly 16305 visible charters (I’m not sure what else WP sends in the json string). I used “123456789” for the title, and then again as a word and repeated in a single paragraph 1630 times e.g. “123456789 123456789 123456789” etc. No error, added 5 more characters “1234 ” and I get the error, reduce that to 4 characters “123 ” and the error goes away. When I tried title + two paragraphs, the number of visible characters became 16248 before the error occurred.
Is there a fix for this? A setting I’m missing, or is this a bug in the latest version of WP?
Summary:
- In browser: “Updating failed. The response is not a valid JSON response.”
- In the debug.log file (with wp debug on): “PHP Notice: Function WP_Scripts::localize was called incorrectly. The
$l10n
parameter must be an array. To pass arbitrary data to scripts, use thewp_add_inline_script()
function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.) in \wwwroot\wp-includes\functions.php on line 6085″ - Server: WordPress 6.6.2, IIS 10.0, MySQL 5.6.47, PHP 8.1.5 (INI: Mem Limit 512MB, Post Max 128MB, Upload MAX 512MB)
- Error occurs with all plugins disabled, and when using the default 2024 theme.
- Tested with multiple pages. Always the same, I can get the error to go away by reducing the amount of text on the page, adding text back triggers the error
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.