-
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
PostAuthor component can cause a crash for some users #4437
Comments
I have this problem still with gutenberg 2.0.0 (Hoped #2702 would fix it, as that is the error I'm getting), not running multisite, single author/admin (me), but has been running + upgraded since WP 2.0. I did a check for a potentially problematic plugins (wp super cache) but disabling that didn't help either. |
Looking at the change that fixed it for most people, we need to make sure the component gets the new I think I have enough info to start working on a fix now. |
Ooooookay, it's not quite the bug I thought, so updating here in case anyone sees this and goes, "oh yes, just flip this switch and all is fine.". The component gets all the users in an edit context, and checks if they have at least This can't be fixed in the same way as the other fixes because it's using a different API, so I'm not sure on what the fix would be yet. Investigating further. |
Have you seen https://core.trac.wordpress.org/ticket/16841 ? That might provide some additional context/info! |
That could explain why you're getting the crash! My situation is different, but results in the same error. I'm currently working out if it's one particular user (which would point to the bug you linked, or similar), or if I'm not getting any capabilities back from the API at all. Will keep this issue updated! |
I have that same problem on my test system (WP 4.9.4, GB 2.3.0, TwentySixteen Theme). I disabled all plugins but Gutenberg and still can't edit anything.
|
As of Gutenberg 2.4.0 this is still an issue unfortunately. |
This was addressed by #6515 and fixed for Gutenberg 2.8 |
The PostAuthor component references
user.capabilities.level_1
, anduser.capabilities
is sometimes undefined. This causes an immediate crash.I don't know exactly the circumstances that cause
user.capabilities
to be undefined, but we had this problem a while back in #2702 and it was fixed for most cases in #4122 .The check occurs in
editor/components/post-author/index.js
line 42.Is there a check we can replace this with, in the same way as we did in #4122?
If someone could give me some insight as to what we should be checking here, I'd quite like to implement the fix so I learn more about this :)
The text was updated successfully, but these errors were encountered: