-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Unhandled promise rejection Error: "[object Object]" #12982
Comments
Re-opening because the person who opened #12208 said the issue resolved for them automatically. |
If you are still having trouble, please update to the latest stable release of WordPress and please check to make sure your site's API is working properly. You can do that by adding If you find you are still having trouble, please ask to re-open this issue (or create a new one) with any relevant details you may have found in addition to your earlier report. |
FWIW for future people having this problem, the REST API won't work if you turn on pretty permalinks but don't update your .htaccess. For Gutenberg's part, would it be any trouble to print a more descriptive error in the console (e.g. "REST API not accessible")? |
The messaging will be improved here very slightly as of #13315 (slated for Gutenberg 5.0), but only in logging the actual error object rather than On Gutenberg's part, these errors should ideally never occur, either being accounted for on a case-by-case basis with some graceful fallback (or UI messaging, not console messaging). Alternatively, I could imagine it as part of some generalized WordPress "site checkup" feature to detect possible misconfigurations like the one you describe. |
I keep getting the same error. It doesn't seem that my .htaccess is a problem, it gets updated... More details here. |
@jaumemirallesisern I'm not sure yet what might be going wrong in your case but as a first check and since you didn't mention it the linked support forum post, did you test to make sure your site's API is working as expected? |
@designsimply thanks for your response. |
@jaumemirallesisern There are different reasons for the Rest API to not work properly.
Unfortunately, we can't do anything about it in the Gutenberg repo. you should try to debug and find the culprit for your particular use-cases. One first step could be to check the response content of the network request triggering the issue. (in your browser console's network tab) |
I will share my experience on here. My problem with my theme's functions.php there is a shortcode function which is using ob_start() and ob_get_clean() functions. When I activate another theme, or empty the functions.php, problem is gone. For solution, I wrapped in Maybe this help you too. Try empty your theme's functions.php (of course backup first, heheh) if problem is gone when your functions.php, is empty, look the ob_start() and ob_get_clean() functions and disable for admin panel. Hope this helps. |
I am not able to create a post. I am using twentynineteen theme without any plugin. "Unhandled promise rejection Error: "[object Object]"" error is occurring in console. I am using WordPress image "wordpress:5.0.0-apache" from docker hub.
Screenshot: https://prnt.sc/lwjqfh
The text was updated successfully, but these errors were encountered: