"Publishing failed" message fixed by changing to "Day and name" permalink structure? #2596
As noted in a comment to another thread I installed Gutenberg 1.0.0 onto a WP 4.8.1 Multisite installation and found that after activating Gutenberg in two different sites on the same WP MS server, I could successfully publish in one site but not in the other.
The first site (deepdark.blue) gave me a "Publishing failed" message when I tried to publish a post and an "Updating failed" message when I tried to save the post or add an image via drag-and-drop.
Using Google Chrome (on a Mac) I opened Developer Tools and then the Network tab. After seeing an error message after "Publishing failed" I could see that the Header message was:
I then activated Gutenberg on a second test site (danyork.org) on the same WP MS server and found that I could immediately use Gutenberg to add new posts without any issues.
While the two test sites had different themes, they had similar plugins activated. Based on some other older posts I saw online, I looked at permalinks. The second site had "Day and name" selected for the permalink structure. The first site did not. It was using "Month and name".
I switched the first site to have a permalink structure of "Day and name" and ... ta da... Gutenberg worked fine from that point onward, including saving and publishing the post that had failed before.
HOWEVER, I was not able to reproduce the error by switching the second site back to "Month and name" and having Gutenberg fail.
And, after switching the first site to "Day and name" and having Gutenberg work, I then switched in back to "Month and name" ... but publishing still worked.
So I cannot reproduce the issue after fixing it. There may be something else completely different going on here.
Steps to Reproduce (for bugs)
I don't have any other test sites running on the server right now and don't have time today to set one up, but in the hope that perhaps someone else can test this, I would need to:
Gutenberg should work for all sites on a WP Multisite server.
It worked for one site but not for another. (There are additional sites on that particular server, but they are production sites and I don't want to activate the plugin there.)
I don't have any suggestions.
Questions that occur to me:
The text was updated successfully, but these errors were encountered:
This issue is not specific to Gutenberg, it's global to any WP REST API usage, I don't know if your webserver is Nginx but I think there's a known issue with the API when using Nginx and keeping the plain permalinks. Others may be more aware of permalink related API issues
Today after the upgrade to WordPress 5.0 on a WP multi-site server, I experienced this exact issue again. On a site where the permalink was set to "Post name", I tried to edit a post in Gutenberg and got the "Updating failed" error. I then went into the Permalinks and changed the setting to be "Day and Name" - and the editing of the post then worked fine.
Curiously, if I then went to the Permalinks setting and changed back to the previous setting ("Post name", in this case), then it still worked.
So perhaps the action of changing the permalink structure was enough to make this work?
To follow up on my last comment, I had this "Updating failed" problem tonight with another site on the same WP Multisite server after the upgrade to WordPress 5.0. This time, what I did was this:
I have no idea why making this change would cause Gutenberg to work properly, but it does.
I just updated a site to 5.1.1 and I cannot save any page/post unless I turn permalinks off. With any permalink setting enabled, I get (replacing the real domain):
This is a generic shared hosting account (aplus.net).
Should this be reopened? Is there any more information I can provide that would be helpful?
is there a solution for this?
Also I realised that if i add
Could be the forcing all thru https. I have just enabled the SSL on this VPS
It returns this error in dev tools>network:
I have it solved. I'll put it down here for others.
as of HERE.