Support » Fixing WordPress » Updating failed. Error message: The response is not a valid JSON response.

  • Resolved sarseth

    (@sarseth)


    I’ve created my first post, about me page, customised everything.
    Then I’ve registered domain and assigned it.
    Now, when I’ve changed Site Address to the new domain suddenly I can’t edit posts. And this is the message I get.
    Updating failed. Error message: The response is not a valid JSON response.
    I can quick edit but cant edit by normal way.
    When I revert my ‘working copy’ address provided by bluehost it works perfectly.
    I’m in dark, since I cant find stacktrace ^^

    Found some similar issues, but always was considering attachments only. It’s not only for me and it is probably not broken by plugin, since I’m changing option in general.
    And I use only basic ones:
    Bluehost
    Code Syntax Block
    Google Analytics for WordPress by MonsterInsights
    Health Check & Troubleshooting – did not help
    Jetpack by WordPress.com
    OptinMonster API
    Yoast SEO

    • This topic was modified 10 months, 2 weeks ago by sarseth.
    • This topic was modified 10 months, 2 weeks ago by sarseth.
    • This topic was modified 10 months, 2 weeks ago by sarseth.
    • This topic was modified 10 months, 1 week ago by sarseth.
Viewing 15 replies - 1 through 15 (of 56 total)
  • the contents the url are stored in the database, after setting the new url (home and siteurl), with a plugin you have to search for and replace the old url in the new one. (otherwise the post has the old name).
    Plugins or script for change url

    Diagnosing errors, there is also a link to recover a javascript error.
    Error

    Helped a bit, thank you very much!. But can’t find it satisfying all problems. I mean, I’ve created now totally new page, from scratch.
    No posts, no plugins. Just default ones like jetpack and bluehost (essentials) and rapidly after clicking “create new WP page” I’ve changed Site Address to my personal one. Leaving WordPress Address the old one (I prefer this way) and I cant edit posts. Is WordPress always like that? I want to change my sample page and I get this not valid json response:
    “Access to fetch at ‘https://mypage.com/index.php?rest_route=%2Fwp%2Fv2%2Fpages%2F2&_locale=user’ from origin ‘https://my.host.mybluehost.me’ has been blocked by CORS policy: Request header field x-wp-nonce is not allowed by Access-Control-Allow-Headers in preflight response.”.
    I know, I know it’s chrome, but why there is not response on page what’s wrong? Why anyway my WP admin page send requests to mypage.com if I want to edit everything under my.host.mybluehost.me and then when it’s published then let it work itself for that Site page?

    Is it possible to have different sitepage and wordpress page? Why this option if by default we have errors?

    • This reply was modified 10 months, 1 week ago by sarseth.
    • This reply was modified 10 months, 1 week ago by sarseth.

    you cannot make a request from one domain to another domain ..
    Bad:
    Request: http://domain.com
    To: http://www.domain.com

    Good:
    Request: http://domain.com
    To: http://domain.com
    I hope you’re fine 🙂
    the block does not depend on wordpress but on the browser.
    There are plugins that add a header .. just for aesthetics it is not good to add such headers.

    Ok, it happened to be some issue with php 7.3, Jetpack, SSL things, htaccess file. To much for my level of knowledge.
    And it all broke from starting page. Weird but good in a way that I lost only one post and one simple page.
    Thanks for tips

    Hello. I too am getting this error message: Updating failed. Error message: The response is not a valid JSON response. I cannot update simple text on any page. I am running WordPress 5.3, PHP version 7.3.11. Health Check shows all as good. Switching themes does nothing. Please any assistance provided for this would be greatly appreciated. I cannot update anything on our website and things need to be updated ASAP. Thanks, Paul

    Why was this topic “closed” when there is no valid response for the issue?
    I just saw this on a customer’s site too, any attempt to edit an article/blogpost would trigger this error.

    After a certain period of time, the topics are set to resolved to give visibility to new topics for better support.
    Can you please describe your problem?
    do you use Gutenberg?
    when you save posts, the editor converts them to WP_HOME if you used WP_SITEURL, while with the classic editor you can save your articles with any domain.
    Read this https://wordpress.org/support/topic/different-wp_siteurl-and-wp_home-internal-requests/

    I have the latest WordPress installed and yes Gutenberg came with it.

    The WordPress Address (URL) and the Site Address (URL) have the same value: https://domain.com

    Every time a post is saved, we get this error: “Updating failed. Error message: The response is not a valid JSON response.”

    Can you enable the php error log on your server? in your php.ini otherwise enable the two constants

    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );

    in your wp-config.php file before require_once.
    If you have errors (PHP or JavaScript) WordPress cannot do magic.
    Debug WordPress https://wordpress.org/support/article/debugging-in-wordpress/

    For troubleshotting JavaScript https://wordpress.org/support/article/using-your-browser-to-diagnose-javascript-errors/

    Check your Server Memory Limit

    ad this on wp config file

    define( ‘WP_MEMORY_LIMIT’, ‘256M’ );

    I’m having the same issue (topic created here).

    From my findings so far this seems to be an issue related to the REST API, see this topic.

    asw

    (@astreetweb)

    Try resaving your permalinks settings – Admin > Settings > Permalinks

    Updating failed. Error message: The response is not a valid JSON response.

    I am receiving this message
    i cant replace the pages no edit them

    Using the classic editor (https://wordpress.org/plugins/classic-editor/) worked for me.

    I have this JSON error for uploading images for months.

    WORDPRESS didnt fix it even until today.

    I can’t blog at all.

    Anyone can help?

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