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 2 years, 6 months ago by sarseth.
    • This topic was modified 2 years, 6 months ago by sarseth.
    • This topic was modified 2 years, 6 months ago by sarseth.
    • This topic was modified 2 years, 6 months ago by sarseth.
Viewing 4 replies - 1 through 4 (of 4 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

    Thread Starter sarseth

    (@sarseth)

    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 2 years, 6 months ago by sarseth.
    • This reply was modified 2 years, 6 months 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.

    Thread Starter sarseth

    (@sarseth)

    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

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Updating failed. Error message: The response is not a valid JSON response.’ is closed to new replies.