Can’t publish, edit or delete posts since Gutenberg update

I am able to create a new post but I get a generic error message Publishing failed if I try to publish it. Same thing if I try to edit it (or any other post).
If I try to delete the post using the Move to trash button, I get another error: The response is not a valid JSON response.

The issue only happens in the new Gutenberg interface (wp-admin/post.php) I am able to publish or remove the post using the “quick edit” functions on the posts list view (wp-admin/edit.php)
The problem occurs with all users and for all post types (I tried with posts and pages). Deactivating all plugins and visiting the permalinks page did not solve the issue.

2 Answers
2

This is most likely a plugin or theme conflict in one way or another. Here’s the steps I’ve taken when troubleshooting Gutenberg-related issues:

  1. In a staging environment, deactivate all plugins — posting should work as intended now. If it doesn’t then the issue is more likely a theme conflict.

    1.a. If it’s a theme conflict, then switch to a default theme to confirm. If you confirm it’s a theme conflict, start by going through your functions.php file and commenting out all add_action and add_filter lines one by one until you find the culprit.

    1.b. If none of the actions or filters are the issue, then start commenting out each wp_enqueue_scripts line one by one. Most likely the conflict then is with some JS that your theme enqueues throughout the admin area.

  2. If you determined that it was a plugin conflict, activate each plugin one by one until you see the problem again. I would start with plugins that interact with your post edit screen in any way, like metabox plugins or custom post type plugins, etc. Also plugins that interacted with TinyMCE in any way. Once you find the offending plugin or combination of plugins, you can decide whether you really need that plugin or not, bring it up to the plugin author, or start troubleshooting the issue yourself (in a similar fashion to how I described theme troubleshooting above.

That method finds the solution typically 9.5/10 times for me. If none of that works, then you need to look at your hosting environment for strange htaccess issues, or wp-config configurations, or server-side security or caching issues.

Good luck!

Leave a Comment