• Hello,
    a couple of days ago I noticed a problem with 3 wordpress websites, all of them installed on the same shared hosting account. I cannot publish or even update posts and pages.
    If I try to publish a post, everything seem fine but actually when I get back to the post later I find it empty and saved as Auto Draft. If I try to edito an old post, one created before this issue, I get an message “the editor encountered an unexpected error” and I cannot even access the post.
    The only workaround I found: installing the Classic Editor plug-in. Also, posting through the dashboard home “Quick Draft” feature works, as does the quick edit – I can at least change the title and/or categories.

    All the installs are up-to-date (WP 5.5.1 at the time of writing), PHP 7.3, all the plugins are updated to the latest version.

    I tried the obvious troubleshooting steps:
    1) turned Debug on – no clues
    2) disabled all plug-ins and switched to TwentyTwenty – no results
    3) disabled the cache module from my hosting provider (accessible via CPanel), but no luck
    4) when I asked my provider to flush the cache from their side, then I managed to publish just one post, but then the problem came back
    5) tried to strip the .htaccess to a bare minimum but again no luck
    6) checked the site inspector console but I cannot see js/ajax errors – actually, no errors at all.
    7) tried to switch to plain permalinks, or simple postname pretty permalinks (I usually use a custom structure) but nothing changed.
    8) since I recently updated two of the websites to PHP 7.3.0 tried to revert to a previous version of PHP, but again no changes

    The only interesting thing is that when I installed the Health Check plug-in I got a REST API error “The REST API did not process the context query parameter correctly.”
    Then I checked the REST API url (/wp-json/wp/v2/post) and it outputs correctly my posts, so the endpoint seems to work. I manage other 5.5.1 install on different servers and they work just fine, I can use the block editor without any issue.

    Honestly I don’t know what else I can do, but before re-installing WordPress from scratch and importing a back-up I’d like to understand what happened to all three websites. They use different themes and plug-ins, they only have the same hosting in common, but the hosting denies any responsibility.
    Also the dev versions of all the websites work just fine on my local MAMP install.

    Any suggestion is much appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator t-p

    (@t-p)

    the editor encountered an unexpected error

    Error like this are logged.

    Please check the error logs on your server for a more specific error message, which may give a clue to why this is happening on your website/server. If you need help locating them, ask your hosting provider to help you with that.

    Meanwhile you can try to disable all plugins, and switch to the default Twenty Twenty theme. If the problem goes away, enable them one by one to identify the source of the problem. If you can install plugins, install Health Check. On the troubleshooting tab, you can click the button to disable all plugins and change the theme for you, while you’re still logged in, without affecting normal visitors to your site.

    Thread Starter kikaweb

    (@kikaweb)

    Hello @t-p, I have done all the things you suggested, and as I’ve already posted the Health Check simply reports a problem with REST API.
    I also had a second look at the error log, just to be sure, and there’s nothing there. There was a minor error regarding an old table, related to a plug-in I uninstalled months ago, but after a db cleaning the error disappeared – my problem persists, though.
    It still looks like a problem with the REST API – after all, the classic editor works, and in general everything that doesn’t involve REST API seems to work just fine.

    Moderator t-p

    (@t-p)

    Health Check simply reports a problem with REST API

    You need REST API for the new editor to function. The new editor talks to the WordPress back-end via the REST API.

    Now you need to find out why there is problem REST API.

    It might have been disabled by a plugin, or a s code snippet.

    You may also discussed with hosting provider.

    Thread Starter kikaweb

    (@kikaweb)

    You need REST API for the new editor to function. The new editor talks to the WordPress back-end via the REST API.

    Hence the subject of this post.

    It might have been disabled by a plugin, or a s code snippet.

    Having disabled all plug-ins and switched to Twenty Twenty (manually, that is not through Health Check) I’m pretty sure it’s neither a plugin nor a snippet

    You may also discussed with hosting provider.

    That’s what I did, since it was strange that three websites with different theme/plug-in configuration had the same problem, at the same time. But my hosting said everything’s ok on their part.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Cannot save or update posts with Gutenberg’ is closed to new replies.