# WordPress.org

## Make WordPress Core

Opened 6 years ago

# Orphaned Comments From Nonexistent Post Type Causes Capability Warnings in Admin — at Version 1

Reported by: Owned by: Funkatronic normal normal 4.4 Comments needs-patch needs-unit-tests administration

So I have a comment or two attached to a post type that isn't currently active. Because the post type isn't turned on, I'm getting the following warnings in the admin screen whenever the comment is displayed:

Notice: map_meta_cap was called <strong>incorrectly</strong>. The post type series_season is not registered, so it may not be reliable to check the capability "edit_post" against a post of that type. Please see <a href="https://codex.wordpress.org/Debugging_in_WordPress">Debugging in WordPress</a> for more information. (This message was added in version 4.4.0.) in D:\Web Development\www\beta\wp-includes\functions.php on line 3787


It also shows up on the Dashboard in the comments widget:

I think this is related to #16956 (thanks @boonebgorges). Basically, because the post type doesn't exist anymore, the it messes up the capabilities of a comment that is attached to a post of that post type. I suggest maybe hiding the comments of post types that don't exist/inactive.

### #1 @SergeyBiryukov 6 years ago

• Description modified (diff)
Note: See TracTickets for help on using tickets.