Closed hazephase closed 6 years ago
It happens here as well.
Tried both on wordpress.org 4.9.1 and on wordpress.org nightly releases.
Tried both gutenberg 1.8.1 and on gutenberg 1.9.0.
Tried on several different browsers: latest chrome, old Internet Explorer, Safari… it’s NOT a browser issue.
The chrome console reports an error in load-scripts.php?… http://server.com/path/to/wordpress/wp-json/wp/v2/posts/37 403 (Forbidden)
@hazephase @casaschi Thanks for your reports.
Have you disabled the REST API? What plugins are you using? Are you running the site on a local machine, a Webhost or in a CDN?
I'm using a fresh install, first a fresh install of 4.9.1 then adding the beta test plugin for nightly updates.
No other plugin loaded.
It's a fresh install where I wanted to test whether my own plugin (that provides a custom bbcode) still works well with gutenberg. But I can't get guternberg to work even before installing my plugin.
I did not intentionally disable the REST API, whatever a fresh install does, that's how my test system is setup.
@Soean I am using a WebHost, GoDaddy. I have not disabled REST API but not sure if that is going to help as @casaschi have a more fresh install of WP. I have some plugins installed already.
Possibly related to #2565?
Unlikely related to 2565 because I have no cloudflare in my setup, at least as far as I’m aware. Any suggestion how to rule that out completely?
I have the same 'Update failed' problem on two different installations, but on the same server. So maybe it's a server setting...?
It would be useful to have the error message returned from the save attempt.
Similar instructions exist for other browsers, but if you use Chrome:
I get the "Error 403: forbidden" page from my site (I mentioned the 403 error code in my original post if you read carefully)
Updated to gutenberg 1.9.1 and no changes, still unable to update/publish posts.
@aduth I get:
You don't have permission to access /wp-json/wp/v2/pages/211 on this server.
and:
PUT http://domain.de/wp-json/wp/v2/pages/211 403 (Forbidden) send @ jquery.js?ver=1.12.4:4 ajax @ jquery.js?ver=1.12.4:4 e.ajax @ backbone.min.js?ver=1.2.3:1 e.sync @ backbone.min.js?ver=1.2.3:1 sync @ wp-api.js?ver=4.9.1:880 save @ backbone.min.js?ver=1.2.3:1 save @ wp-api.js?ver=4.9.1:892 REQUEST_POST_UPDATE @ index.js?ver=1513191009:11 (anonymous) @ index.js?ver=1513191009:32 (anonymous) @ index.js?ver=1513191009:32 (anonymous) @ index.js?ver=1513191009:11 v @ index.js?ver=1513191009:11 callCallback @ react-dom.f04e56af.js:1527 invokeGuardedCallbackDev @ react-dom.f04e56af.js:1566 invokeGuardedCallback @ react-dom.f04e56af.js:1423 invokeGuardedCallbackAndCatchFirstError @ react-dom.f04e56af.js:1437 executeDispatch @ react-dom.f04e56af.js:1660 executeDispatchesInOrder @ react-dom.f04e56af.js:1679 executeDispatchesAndRelease @ react-dom.f04e56af.js:2197 executeDispatchesAndReleaseTopLevel @ react-dom.f04e56af.js:2208 forEachAccumulated @ react-dom.f04e56af.js:2174 processEventQueue @ react-dom.f04e56af.js:2367 runEventQueueInBatch @ react-dom.f04e56af.js:2379 handleTopLevel @ react-dom.f04e56af.js:2389 handleTopLevelImpl @ react-dom.f04e56af.js:2028 batchedUpdates @ react-dom.f04e56af.js:14309 performFiberBatchedUpdates @ react-dom.f04e56af.js:1874 stackBatchedUpdates @ react-dom.f04e56af.js:1865 batchedUpdates @ react-dom.f04e56af.js:1879 batchedUpdatesWithControlledComponents @ react-dom.f04e56af.js:1892 dispatchEvent @ react-dom.f04e56af.js:2102
can you help us?
Is domain.de
the actual domain for your site? Or a dummy URL you used? Or where you host?
Obvious issue being that the WordPress REST API is not accessible at all on that host:
domain.de is a dummy URL. My host is All-Inkl.com
but /wp-josin/ is accessible. opening the URL https://domain.de/wp-json/ brings me the whole json information, without an error. also for example http://domain.de/wp-json/wp/v2/pages works. and existing pages are working too: http://domain.de/wp-json/wp/v2/pages/18
but when i am saving or updating a page in gutenberg i get the error: PUT http://domain.de/wp-json/wp/v2/pages/2 403 (Forbidden)
@mobotter I am using the same Hoster without this error. Which user role are you using inside WordPress
wordpress/wp-json/ is accessible for my site also, but still getting 403 (Forbidden) for wordpress/wp-json/wp/v2/posts/37
I am Administrator on these installations...
In Firefox I get the following errors: 404 not found - The requested URL /wp-json/gutenberg/v1/reusable-blocks was not found on this and 405 Method Not Allowed - The requested method PUT is not allowed for the URL /wp-json/wp/v2/pages/2.
Why PUT is not allowed? GET Requests work..
Maybe it's a problem with the REST API and mod_security and not with the gutenberg editor itself...
I am sorry, my mistake. It was my .htaccess with a RewriteCond for some Request Methods. after removing them, saving posts works again. sorry. :)
@casaschi Can you confirm whether you have any custom rules in an .htaccess
(or equivalent nginx/other server software config) if this is available to you to check?
I have a clean install of wordpress.org that I did explicitly for testing gutenberg.
The .htaccess file was created by the wordpress.org installation and looks like this
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /ZZZ/wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /ZZZ/wordpress/index.php [L]
</IfModule>
# END WordPress
I tried removing all those entries but then the wordpress.org admin pages fail to work, I can't even get to the new post editor page.
Hmm is this a subdirectory install?
https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory
This is the URL: http://pgn4web.casaschi.net/ZZZ/wordpress/
It's in a subdirectory but it's happy to show the path in the URL, no rewrite rules for that. Again, everything installed fresh with all config and .htaccess done by the wordpress.org install.
Updated to plugin version 2.0.0 but the "updating failed" error is still there :-(
@casaschi I had this Rule in my .htaccess file
_RewriteCond %{REQUESTMETHOD} ^(connect|debug|delete|move|put|trace|track) [NC] RewriteRule .* - [F]
maybe your hoster blocks the put method.
hope that helps
So I just opened a post, i was working on for the last couple of days.
here are the error messages from the dev tools:
load-scripts.php:9 JQMIGRATE: Migrate is installed, version 1.4.1
13:43:34.899 chrome-extension://jnhgnonknehpejjnehehllkliplmbmhn/content_script.js:24 initializing Content Script message listener
513:44:10.703 Blocked form submission to '
Also, I have React tab on the dev tools and here are the props. maybe that helps: children: {…} $$typeof: Symbol(react.element) _owner: null key: null props: {…} ref: null type: a() messages: {…} a11yNotice.opensInNewTab: "(Opens in a new browser tab)" content-analysis.considerations: "Considerations" content-analysis.disabledButton: "Marks are disabled in current view" content-analysis.errors: "Errors" content-analysis.good: "Good results" content-analysis.highlight: "Highlight this result in the text" content-analysis.improvements: "Improvements" content-analysis.language-notice: "Your site language is set to {language}." content-analysis.language-notice-contact-admin: "Your site language is set to {language}. If this is not correct, contact your site administrator." content-analysis.language-notice-link: "Change language" content-analysis.nohighlight: "Remove highlight from the text" content-analysis.problems: "Problems" locale: "en_US"
I also have a screenshot.
Closing, as it doesn't appear there's timely and immediately actionable information in this issue. Feel free to open a new issue if the problem comes up again and we can diagnose further.
Same, updating failed on my site https://droidfeats.com/
Same with me. Please help :-(
My problem solved with
Toggle Off
from On
ModSecurity in cPanel hosting provider
You can change Gutenberg Editor to classic editor the error does not occur after changing the editor
Hey, I just spent a couple of hours with something very similar. Here, the call to
/wp-json/wp/v2/pages/123?_locale=user
would fail with a 503.
I tried calling it manually, and it would work without the query string...
Then I tried the usual suspects: disabling all plugins, re-saving permalinks etc., and what finally did the trick was freaking deleting .htaccess
, re-saving permalinks (only to have it replaced with pretty much an identical file). Weird, weird, weird.
My problem solved with Toggle
Off
fromOn
ModSecurity in cPanel hosting provider
Multisite here, classic editor, solved with this.
We get this error only when the text has the word 'having' or has a text with two single quotes eg This is an 'apple' and 'fruit'. With the latest Wordpress 5.3.2 .
RewriteCond %{REQUEST_METHOD} ^(connect|debug|delete|move|put|trace|track) [NC] RewriteRule .* - [F]
Awesome, it worked perfectly. Got relieved after searching everywhere for this one single line.
In my case the problem was caused by the underscore sign at the beginning of the meta key name. Once removed the error has gone.
My problem solved with Toggle
Off
fromOn
ModSecurity in cPanel hosting provider
Great tip here- I did this and no more WP JSON API issues and it's cool since my WAF is active
For me it was a 3rd party plugin, deactivating it helped.
Looks like this is a catch-all error message, whether you have a bad plugin, wrong htaccess or a HTTP error...
Issue Overview
I have a post that I am working on for a few days, when I try to update it I get a error updating failed.
Steps to Reproduce (for bugs)
Expected Behavior
It should update the post
Current Behavior
I get a error message "Updating failed"
Possible Solution
Screenshots / Video
Related Issues and/or PRs
Todos