• 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 the wp_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
    • This topic was modified 1 week, 6 days ago by realitystorm.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Check your browser’s developer tool to see what exactly the response is when saving. My guess is that an error occurs that is so serious that it does not appear in the debug.log. Since you have an IIS server, limit values there could be the cause. It should be possible to recognize this in a server-side log.

    Thread Starter realitystorm

    (@realitystorm)

    It is definitely something on the server side going on. When I save the json information is sent to admin-ajax.php.

    • For longer text I get the JSON error on the page, and there is no value in the “response” tab (no response received from the server)
    • For shorter text I do not get the JSON error on the page, and there is a value in the “response” tab, showing the ID of the entry, the date, the guide, etc.

    What is weird is the longer pages are updating even though I’m getting this error, so the json is sent, parsed, the db is getting updated, but for some reason, for longer pages, I’m not getting a valid json response back.

    That sounds really strange, but as you have already realized, it must have something to do with the server. Turn on all debugging and logging that is possible there – maybe you will find the problem that way.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.