• Resolved meriellloyd

    (@meriellloyd)


    When trying to update a post or page on local dev site i keep getting this error “Updating failed. Error message: The response is not a valid JSON response.”

    Doesn’t happen on live site.

    I have run Health Check & Troubleshooting mode but still get the error so it’s not a theme or plugin issue.

    I DON’T get the error when running the Classic Editor plugin. I prefer the new block editor so would like to fix this issue than rather just avoid it.

    Any help/tips would be greatly appreciated.

    Many thanks,

    • This topic was modified 4 years, 11 months ago by James Huff. Reason: moved to Locahost Installs forum
Viewing 15 replies - 16 through 30 (of 53 total)
  • Amber

    (@amberrrapp94)

    Has anyone figured out the issue?

    I have changed the postname, but nothing has changed. My SSL is updated. Any other suggestions?

    I had the same issue, and spend lots of time tracking it down.

    It turned out the apache2 config file for the site. Check you domain location in the file. Located something like /etc/apache2/sites-available/your-domain.conf

    <Directory /var/www/your-site-location>

    My site location was wrong, I corrected it, and happy days.
    Hope this could help you, when you tried all the other stuff suggested in this thread.

    I have this issue on a brand new test installation on a Nginx server. No plugins.

    Switching the permalinks back to &p=123 solved it, but this clearly isn’t an ideal solution.

    Viraj Shah

    (@virajshah231296)

    Updating your permalink structure works!

    I was also seeing the same error while editing my blog posts. here are some details on fix.

    WP 5.5.1, php7.4

    domain (cloudflare) ==> Nginx ==> WP Docker Container

    I tried different solutions suggested here and the following worked for me;

    1. Changing permalink from custom format to https://www.XXXX.xyz/blog/?p=123, However, this is a no go for me due to SEO.

    2. Installing classic editor plugin and use it to update my blog post.

    • This reply was modified 4 years, 2 months ago by adeelahmadch.
    • This reply was modified 4 years, 2 months ago by adeelahmadch.

    I was able to resolve this by following @thegulshankumar advice of turning off cloudflare WAF on wp-json/v2/ URL. Thank you Gulshan

    • This reply was modified 4 years, 2 months ago by danishmuneer.

    @danishmuneer Glad! It’s resolved now. ??

    @thegulshankumar yes ?? my only concern is…disabling WAF on a URL would leave our site vulnerable to an attack?

    Maybe! If your concern is security, go static
    https://www.gulshankumar.net/static-wordpress-bunnycdn/

    @scottofford turning permalinks off then back on worked for me. Thanks a ton!

    Hello,

    I have the same issue on several website installed in multisite.

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

    And error in the health site check up :
    The REST API did not behave correctly
    The REST API did not process the context query parameter correctly.

    I have tried everything I could do and understand, the permalink update doesn’t work, in does work in Plain but that’s not a real fix, same with the classic block editor works but as the website have been created with Elementor, it can’t be the solution. I actually can’t open Elementor editor either because of this bug.

    I don’t have cloudflare and don’t really understand how to edit wp-json/v2/ nor apache config, not sure I can access it.

    My wordpress version is 5.5.1 and my server provider is OVH. I have SSL enabled.
    The last website I’m trying to edit is https://olivierherter.be

    I’ve tried disabling the plugins but no change,
    I’ve tried this in htaccess but couldn’t access my site anymore so returned to normal :
    SecFilterEngine Off
    SecFilterScanPOST Off

    Anyone could help me out ? I’m getting desperate !

    Thanks a lot !

    I was facing the same problem. Turned out that the Apache’s
    mod_rewrite module wasn’t enabled.

    1. Go to Settings->Permalink settings
    2. select option as post name.
    3. Save changes
    It resolves my error.

    zai3991

    (@zai3991)

    Check the video in that 1 of the solution is for that JSON error

    v1997

    (@v1997)

    Now, here there are two server blocks, first one is running on port 80.
    for second server block there is a port 443 where you should implement the below code.

    server{
    #ssl configuration
    location / {
    # First attempt to serve request as file, then
    # as directory, then fall back to displaying a 404.
    # try_files $uri $uri/ =404; // comment this block
    try_files $uri $uri/ /index.php$is_args$args;
    }
    }
    Now exit and restart nginx server.

    ~$ sudo service nginx restart

    you are done. enjoy.

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