-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to debug "Updating failed" and "Publishing failed" #2565
Comments
Can you open the chrome dev tools, open the network tab, find the failing request (row in red) and check the response content? |
I am getting the same issue. Have dev tools open to network tab, but not sure exactly what data you want from it. Not a dev, so let me know the steps you need me to take. |
So, I discovered that CloudFlare is blocking it. Here is the message when I click on the red line under network tab:
|
I was able to whitelist my IP address at CloudFlare so I could publish and keep testing, but that is obviously not a general public solution. |
What's the exact reason to block the request, any more details on cb1.io? Is it the "enable cookies" message? Why are cookies not enabled by default? It seems that the CloudFlare proxy is too aggressive here. |
Yep, I realise the thing blocking it is Cloudflare as well. Seems strange that no one brought it up until now. Went to CloudFlare and exported to RAW the following error message:
|
I really can't speak to the why. I will tell you that my setup is the standard off the shelf CloudFlare free account setup. I did not make any changes to what gets setup when you add a domain to their DNS except my DNS entries. This could be a bit of a problem for Gutenberg though with the level of use that CloudFlare has. I do not have this problem using Divi with this domain. All publish options work properly in Divi going through CloudFlare, so I suspect something in the way Gutenberg send data is causing the issue. I also cannot speak with any expertise as to the cookie message. I don't have anything special setup related to cookies though in that WordPress instance. I setup a brand new instance of WordPress to test Gutenberg. This install is in a subdirectory of the primary domain which has its own installation of WordPress using Divi. Here is my Raw Export from CloudFlare. If anyone on your team would like to see any specific files, please feel free to reach out. Happy to help. Site is hosted with SiteGround in shared hosting. { |
Yep, I'm surprised this is the first time we see this, especially since we're using the standard API client which should be used elsewhere. I assume this is a general REST API concern and we should investigate why we're being blocked. |
I'm getting a similar error ("Publishing failed.", "Updating failed.") after installing Gutenberg 1.0.0 today. My test site is NOT behind CloudFlare, so perhaps this is a different issue. I am using WordPress 4.8.1 in Multisite mode. I did the usual Network Admin -> Plugins -> Add New to add the plugin. I did not "Network Activate" but instead went to one of my test sites (deepdark.blue) and activated the plugin for that site. I then went to "Gutenberg -> Add New" and began writing a post. I'm using Google Chrome on a Mac. However, as soon as I dragged an image from my Mac desktop to Chrome, it said "Updating failed." and wouldn't let me add the image. I was able to go into the regular Media Library (from within Gutenberg), drag the image from my Mac desktop into there, and then insert into Gutenberg. I then wrote some more text and tried to save, at which point I got "Publishing failed." Again, the test site ( http://deepdark.blue ) is NOT behind CloudFlare, so this may be something different. (Has Gutenberg been tested to work with multisite? with new gtlds?) Any suggestions on how to debug would be welcome. Thanks. UPDATE - I activated the Gutenberg plugin on a second test site on the exact same WP Multisite server and had no problem using the plugin and creating a new post using Gutenberg. A potential difference is that the other site is danyork.ORG, so a traditional gTLD. It also uses a different theme so there could be other issues. |
@danyork I suggest following the debug steps here #2565 (comment) if possible and then if it's a different problem, feel free to create a new issue. |
@youknowriad - Thanks. When I do that and look on the Headers tab at the red line under "Network" when I do a "Publishing failed", I see this (I removed the IP addresses):
when I try to drag and drop an image, I get:
When I look under the "Response" tab I see all the HTML that makes up the Gutenberg editor page. FYI, I am also seeing red errors (on BOTH test sites) for "newest-note-date" with the header:
But that is happening on both the site where Gutenberg is working, and where it is not. |
As noted in that issue 2596, my issue seems to have been fixed - and to have had nothing to do with the Cloudflare issue mentioned here. |
Just a heads-up: this is still happening. I'm currently experiencing the issue with three separate WPMU installations.
The Cloudflare incident message is the same reported above (rule WP0025B), but here it goes: What didn't fix it
What did "fix" it
As @youknowriad mentioned, given how Cloudflare is very widely adopted, I'm surprised we're not hearing more complains about this. I'm a bit dumbfounded by the whole thing. |
Sorry to find about this just now. Whenever you find that Cloudflare has blocked a request you consider legitimate, you need to follow the instructions in this article of our Knowledge base and search for the event matching the request that was blocked. Once you have found the corresponding event, click on "Detail" to show the report as screenshotted above. In there, take note of the rule ID of the rule that was triggered (in the present case: "WP0025B"). You now need to decide if it's safe to disable the rule to let these requests through, and if so:
To answer @trenzterra, only users/domain with a Pro plan would have access to the WAF, so this is only a subset of the Cloudflare user base. |
Confirmed, disabling |
Unfortunately, this means that Cloudflare free users will be left in the cold. Is there a workaround for this? |
Confirmed indeed; disabling WP0025B works. @trenzterra one workaround available to all users is using a pagerule to disable all Cloudflare security for the API's suburl:
This does consume one of the three pagerules available for a free user, but it works. |
I'm getting the same issue. Once in a while on the same article it goes through, but most of the time I get the "Updating failed" message. Only thing that i change between attempts to update are minor, like changing/adding text to paragraphs. Notes
What stands out is the AJAX call result that is being sent to the WP API:
This gives me the following response body:
|
I have the same problem, but I think for a different cause (though it also relates to the API). As I described here, because my site URL and my WP URL are different, anything to do with REST gets me this error:
Followed by repeated
I fixed the second one by disabling Jetpack and iThemes Security (as you say, firewall/cdn-related probably), but the Nonce remains a problem. |
I have a similar issue with cross-origin JS errors blocking the post content block and meta blocks in Gutenberg v1.6.1 running it on nginx/1.10.3 through Cloudflare with add_header X-Frame-Options SAMEORIGIN; set in the nginx.conf file. Refused to display 'https://zeropointdevelopment.com/wp-admin/post.php?post=7898&action=edit&classic-editor=1&meta_box=normal' in a frame because it set multiple 'X-Frame-Options' headers with conflicting values ('SAMEORIGIN, DENY, SAMEORIGIN'). Falling back to 'deny'. Uncaught DOMException: Blocked a frame with origin "https://zeropointdevelopment.com" from accessing a cross-origin frame. Edit: Cloudflare is not blocking these requests above - I checked the firewall and nothing there. |
Hello, I'm trying to refine the Cloudflare WAF rule that is blocking these requests. Could someone provide me with a sample JSON payload that getting blocked? |
I have released a refinement of the rule in question which should resolve this. Please let me know if this problem persists and I will reopen my ticket and continue investigating |
I have the same problem described here but i don't use Cloudflare, to help you guys this is the error showing in my Chrome:
|
Closing as it doesn't appear there are specific actionable items in this issue — feel free to open new issues for subsequent reports. |
Issue was resolved when Cloudflare updated the WAF rules to accommodate the issue. See gutenberg/#2704 for more information on the issue |
#2704 has been re-opened since the issue is still persisting. |
@MichielDeMey Unfortunately it is not something Gutenberg can fix. |
I understand, but some repos prefer to keep an issue open until it has been fixed by the third party so you don't end up with multiple duplicate issues because other continue to open new ones. 🙂 |
I am facing the same issue. Changed different themes, disabled all other plugins but no luck :( |
@azadrpi it's an issue with Gutenberg and Cloudflare. Does disabling the Gutenberg plugin solve the issue? |
Having the same issue |
@caraya Yes disabling the Gutenberg plugin solve the issue. I've checked it with a fresh WordPress installation in localhost. Still same problem. Though there is showing the update failed error, the post/page is updated to the database. After a few wasted hours of my time seeking the solution, I decided to skip the problem for now. Cause I'm learning the Gutenberg API so the problem is not a big deal, but that bothers a lot :( |
I too am facing the problem. I installed it on fresh 4.9.8 and latest nightly build installs. Whenever I go to Add New Post, Chrome developer tool shows this:
|
@azadrpi I hear you... I stopped working with Gutenberg because I got too frustrated. If you work with Cloudflare as your CDN it seems that it was fixed on their end. I'd suggest trying it again and reporting if it still gives you the same error |
@emfluenceindia this seems to be a different issue. I'd suggest opening a separate issue ticket with this information as this doesn't seem to be related to this particular issue |
Here is a video screen-cast I did. Not the problem I was talking about until the problem being talked about here starts happening in the middle of reporting another possible small misunderstanding or false problem. Anyhow check this out. Is this what keeps happening to you? Updating fail, Auto Saved, Generation preview but does not? Fresh install of Wordpress too. http://youtu.be/yVWYDcWXsfA?hd=1 One Solution found here works immediately! https://wordpress.org/support/topic/gutenberg-blocked-by-wordfence/ Wordfence Security was cause mine and it is said to configure the firewall to learning mode and immediately tested and works! Video showing how it is done! https://screencast-o-matic.com/watch/cFQnexqa1y |
I was having the same issue, first i thought it was happening because i set up rules on cloudflare to chance http to https but disabling them didn't helped. I tried solutions above for free CF users but they didn't helped either. In the end i made these changes and gutenberg works this way. I haven't tried cross-solutions actually, just disabled them and it worked out. Still i'm not happy to disable CF ssl, hope there will be a proper solution soon. |
I had a related issue - for me it was ModSecurity firewall configuration in Plesk found via the apache errorlog |
@jamesmthornton, did that just start after upgrading to 3.8? If so, then #9979 might be the cause. |
@iandunn bleh yeah I wrote a post about it 2 days ago, of course google didnt index it tho https://inboundfound.com/solution/cannot-open-edit-post-wp-admin-connection-refused/ |
I was having this issue (unable to save or publish a post via gutenberg). I was able to get around it by NOT signing in via WordPress. When logging in via username and password, it works. |
I am having this issue on nginx SSL enabled, with no cloudflare, this seems to be a persistent bug. I am going to return to classic editor while this is fixed because no webserver settings should prevent such a tool built into the CMS. |
@diveyez the CMS lives in a web server and there may be one or more proxy servers between you and your server. Can you post server logs that may help troubleshoot the problem? If it's not Cloudflare related then it's not the same issue as that was specifically connected to Cloudflare Application Firewall and their blocking some commands from Gutenberg, that has been solved. |
As noted over in #2596 this "Updating failed" issue seems to also be able to be fixed by changing the Permalink setting. (I had this happen to me on one of my sites today after an upgrade to WordPress 5.0 and the permalink change fixed my issue.) |
I'm getting the same "publish/update/save" failed message, however I get no errors in the dev console and despite the message the post does in fact succeed in publishing/updating/saving. I have confirmed this multiple times by publishing, getting the message, going to the list of posts and seeing the post listed as published. My server is hosted on DigitalOcean, I don't know if they use CloudFlare or not, all I know is that it's an ubuntu server running apache. |
On my dev machine running XAMPP and after updating wordpress to 5.0.1 I was receiving "Update Failed" when trying to create a new page. I updated my XAMPP and verified all file and folder permissions were correct and was still getting this error so I setup letsencrypt to get a valid ssl cert and then the message changed to "Publish Failed" when trying to create a new page. I checked the I checked the |
It seems that I have some other issue that wasn't fixed until now. I use mangeto with wordpress under (using fishpig plugin). I have just updated wp to 5.0.1 version, and there is Updating Failed when I try to save draft or update post. The problem in here, to make work correctly wordpress under magento I need to define other url for home and other url for siteurl in options table in wordpress. So magento is using /blog to display the content of blog, and the path for wordpress installation is /news, so option home is set to http://domain/blog and option siteurl is set to http://domain/news. Until now I didn't have this problem. In backend of wordpress when editing post it seems that there are 4 urls of ajax request that use wrong path to the wordpress installlation, they use /blog in place of /news and it gives js conflicts and post is never saved. If someone have a solution I will be greatful... |
Issue Overview
Hi there, I just installed Gutenberg today but am having issues updating an existing post or publishing a post. Basically, Save Draft, Preview and Publish doesn't result in the post being posted. I am only met with a rather unhelpful error message "Updating failed" or "Publishing failed". My WordPress is running on Nginx on Ubuntu 16.04 on a DigitalOcean VPS.
How do I go about debugging Gutenberg? Thank you.
Steps to Reproduce (for bugs)
Tried both chrome and firefox with same results.
Expected Behavior
It should save draft/ preview/ publish correctly.
Current Behavior
Cannot post/ preview/ publish.
The text was updated successfully, but these errors were encountered: