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

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

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #1208689
    Michael

    Hi guys,

    Please can you help me work out what is causing the following error when I try to save or update a post?

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

    I checked Site Health and it said this is OK.

    I reinstalled WP but that didn’t help.

    I deactivated all plugins and that didn’t help either.

    I tried making another post but get the same error.

    I don’t know what else to try to solve this and would really appreciate your assistance.

    Thank you very much.

    Michael.

    #1208702
    Leo
    Staff
    Customer Support

    Hi there,

    Do you get the same issue when using a twenty series default theme?

    I see quite a few solutions when googling “Updating failed. Error message: The response is not a valid JSON response when saving a post”. Have you tried any of them yet?

    #1208743
    Michael

    Hi Leo, I have been testing and right now have narrowed it down to in the inclusion of iframe code within the html content of block editor. If I remove this code, the save works. This is really weird because the iframe code is a YouTube embed so should be legitimate? Is this something you could advise me how to fix? Sorry for the confusion – this stuff drives me bonkers. I am using the latest version of WP with the Gutenberg Block Editor.

    <iframe width="560" height="315" src="https://www.youtube.com/embed/OLes-Mc5JwA" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>

    #1208800
    Leo
    Staff
    Customer Support

    What if you try the YouTube embed block?

    We really need to make sure the questions are theme related.

    #1208829
    Michael

    Sure Leo – I understand. My problem was I couldn’t work out if it was theme related or not. I installed the classic editor and it saved the iframe, so I guess there must be a bug in the block editor.

    #1208838
    Leo
    Staff
    Customer Support

    The easiest (and basically the only) way to determine if it’s a theme problem or not is to switch to a twenty series default theme and see the problem exists there.

    Glad you were able to figure out 🙂

    #1209003
    Michael

    Hi Leo, one of the moderators on the WordPress forum said he added the iframe code on a vanilla theme and it worked without error, so he reckons it might be a problem with the theme. Please can you explain if there is any danger for me losing stuff or anything like that if I switch theme to test myself? I have 2020 installed, but am a bit nervous of breaking the site.

    #1209034
    Leo
    Staff
    Customer Support

    It’s always to keep a backup of your site.

    But no nothing will break when you switch themes 🙂

    #1209040
    Leo
    Staff
    Customer Support

    I also just gave this a go and didn’t encounter any issues:
    https://www.screencast.com/t/fqutlH8L

    #1209382
    Michael

    Hi Leo,

    Thanks for getting back to me. Hmmm, bizarre. I had the same issue when I had to add a bit of javascript to a page a few weeks back. It also generated the JSON error. So iframe and jscript cause it, but it’s not theme related, and turning off the plugins doesn’t make any difference. Can you please recommend how else I might determine what is causing this?

    #1209423
    David
    Staff
    Customer Support

    Hi there,

    so your iframe code works fine in all of my tests with the GP Theme which says something is different in your site configuration.

    Right Click and Inspect the editor before saving and then save to see if any Red errors appear in the Console. This may help point to the cause of the problem.

    #1209437
    Michael

    Hi David, thanks a lot for the suggested course of action. I will try that now 🙂

    #1209440
    Michael

    Hi David,

    This is what the console reads:

    15:20:18.564 This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. post-new.php
    15:20:18.800 JQMIGRATE: Migrate is installed, version 1.4.1 load-scripts.php:8:552
    15:20:23.753 uncaught exception: Object
    15:20:24.431 MouseEvent.mozPressure is deprecated. Use PointerEvent.pressure instead. tinymce.min.js:2:9108

    I can’t see any other info or logs

    #1209449
    David
    Staff
    Customer Support

    None of them look related to the issue unfortunately.
    I see quite a lot these ‘errors’ raised on WordPress.org – a lot of which are related to URLs, HTTAccess rules etc. Something that we can’t really help with i am afraid.

    #1209460
    Michael

    No problem David. Thank you for trying.

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