Opened 10 years ago
Last modified 9 years ago
#39028 new enhancement
Comments on private posts or specific edge cases can get a confusting white screen error.
| Reported by: | imath | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Comments | Version: | 4.4 |
| Severity: | normal | Keywords: | needs-patch |
| Cc: | Focuses: |
Description
I have a plugin that uses the private status for a custom post type used in private BuddyPress groups.
When a group member tries to comment on one of the post type he's getting a white screen. I've fixed the issue on my side, problem was about caps mapping.
But still, i was pretty confused by this behavior. At first i thought it was a fatal error, but xdebug returned nothing, so i've looked in my error.log again nothing ??
Then i've found some returned WP_Error was missing data like the 403 status in wp_handle_comment_submission(). As this function was introduced in 4.4, i guess it first appeared in 4.4.
I think it could be interesting to have a screen looking like this in this kind of cases :
I suggest the attached patch.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)

I believe the intention if the current behaviour is to avoid exposing the existence of a private/trash/draft post for users who cannot access it.
The error text displayed for private, trash, and draft posts should be the same as that for posts which do not exist.