Gutenberg: Publish or update post doesn't work with Gutenberg 2.3 and 2.4

Created on 16 Mar 2018  Â·  9Comments  Â·  Source: WordPress/gutenberg

Issue Overview

Wordpress 4.9.4, PHP 7.0.19, Database Percona 5.6.35
Publish or update a post doesn't work ("Updating failed") with Gutenberg 2.3 and 2.4.
Deactivating all other plugins does not help.
Changing language from German to English does not help.
Deleting Gutenberg, logout from wordpress, login again , reinstalling Gutenberg does not help.
Tried with Firefox, Chrome, Opera - does not help.
Only if I make a rollback of the plugin to version 2.2 everything works again.

[Feature] Saving [Type] Bug

Most helpful comment

Hi, this issue is still occurring for me. I'm not a developer in any way, so if someone can help me troubleshoot, that would be really lovely. I have a SiteGround-hosted WordPress site; WP 5.0.2 and cannot update pages. I get the "Updating failed" error in the editor, and the following console errors in the Chrome Inspector:

POST /wp-json/wp/v2/pages/1242?_locale=user 403
POST /wp-json/wp/v2/pages/1242/autosaves?_locale=user 403

All 9 comments

Thanks for the issue. I can't reproduce this myself.

Can I ask you to open the JavaScript console and see if there are any errors you can share? Here's how to open the console in Chrome: https://developers.google.com/web/tools/chrome-devtools/console/

New page, but unable to publish or save it.
Error (replaced real website with term "WEBSITE"):
PUT http://WEBSITE/wp-json/wp/v2/pages/182 403 (Forbidden)
load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,underscore,shortcode,backbone,wp-util,wp-backbo&load[]=ne,media-models,moxiejs,plupload,wp-plupload,jquery-ui-sortable&ver=4.9.4:4

What content are you putting on the post, or is it just an empty one? Is it literally a post or is it a page or some other post type? I've been having an issue with saving drafts of / publishing posts in Gutenberg since 2.3 (and continuing into 2.4) as well, but only with certain textual content... I'm still trying to figure out precisely what causes it, and every time I try saving the post a bunch of times and get the "Updating failed" error, I end up getting temporarily banned from the server I'm using for around 30 minutes or so. (I'm not using Cloudflare like some other people who posted similar issues were.) And when trying to save the draft / publish I'm getting errors in the JavaScript console on Chromium about PUT requests involving load-scripts.php, but with error code 500. I'm not sure if it's the same or a different bug from what you're having, but I thought I'd post what I know here since I don't think I have enough info to make my own ticket yet.

Also, here are some similar issues I've found which may be related:

2704 #5632

Please see also https://github.com/WordPress/gutenberg/issues/3252 or https://github.com/WordPress/gutenberg/issues/2565 it might be related to a firewall / security plugin ... and yes some firewall plugin keeps the entries in .htaccess active also if they plugin ist deactivated or uninstalled...

Same issue here. (I think. Might be different one.)

Details

Environment details

  • Apache/2.4.29 (Unix) PHP/7.2.3
  • localhost (whole WordPress instance is contained in a subdirectory, if it matters)
  • Tried on WordPress 4.9.4 (latest public release) and on WordPress 4.9.5-beta1-42867-src (latest code on SVN)
  • No firewalls
  • No security plugins
  • REST API is accessible at /wp-json
  • All tests were executed with Chromium 65
  • Active plugins:

    • 4.9.4:



      • Gutenberg: Version 2.4.0 by Gutenberg Team[1]


      • Health Check: Version 1.0.1 by The WordPress.org community[1]



    • 4.9.5-beta1-42867-src



      • Gutenberg: Version 2.4.0 by Gutenberg Team[1]



How to reproduce

  1. Open an existing or try to create new post/page
  2. Make any change in the page[2], and click on "Update"
  3. Error message Updating failed/Publishing failed appears

Network request data[3][4]

  • General
  • Response Headers

    • HTTP/1.1 403 Forbidden

    • Server: Apache/2.4.29 (Unix) PHP/7.2.3

  • Request Headers

    • PUT /~nikola/wp495b1/wp-json/wp/v2/posts/11 HTTP/1.1

    • Host: localhost

    • Connection: keep-alive

    • Content-Length: 40

    • Pragma: no-cache

    • Cache-Control: no-cache

    • Content-Type: application/x-www-form-urlencoded; charset=UTF-8

    • Accept: /

    • X-Requested-With: XMLHttpRequest

    • X-WP-Nonce: [redacted]

    • Referer: http://localhost/~nikola/wp495b1/wp-admin/post-new.php

    • Cookie: [redacted]

  • Form Data: title=test&status=publish&content=&id=11 (with no blocks and title set to test)

Console data[3]

Failed to load resource: the server responded with a status of 403 (Forbidden)          /~nikola/wp495b1/wp-json/wp/v2/posts/11

Additional Comments

Not sure if it's related, but clicking on Preview gives a blank window with the following text centered in the middle of the screen (& with blank console):

Please wait… 

Generating preview.

Also, "Save Draft" returns HTTP 403 as well.


  1. Installed from Gutenberg and Health Check wordpress.org plugin pages.

  2. Example content:
    Title & Classic block, Classic block contains any plain text. Issue still occurs even when Classic block is removed.

  3. The request data is from WordPress 4.9.5-beta1-42867-src, but it is identical in WordPress 4.9.4 as well

  4. Removed unrelated headers

Thanks for the bug report, @burnuser and @nikola3244!

I think I have a fix for this, could I get you to test #5741?

If you don't have a development environment setup, you can also test with Gutenberg 2.4, by copy/pasting this function and hook into your install.

@pento Cheers! That did it :+1:

Closing as appears the change fixed it for folks. Please, reopen if you still see issues.

Hi, this issue is still occurring for me. I'm not a developer in any way, so if someone can help me troubleshoot, that would be really lovely. I have a SiteGround-hosted WordPress site; WP 5.0.2 and cannot update pages. I get the "Updating failed" error in the editor, and the following console errors in the Chrome Inspector:

POST /wp-json/wp/v2/pages/1242?_locale=user 403
POST /wp-json/wp/v2/pages/1242/autosaves?_locale=user 403

Was this page helpful?
0 / 5 - 0 ratings