#39651 (Find Posts modal does not show post-type labels correctly) – WordPress Trac (original) (raw)

#39651 new defect (bug)

Reported by: arkonisus's profile Owned by:
Milestone: Future Release Priority: normal
Severity: normal Version: 4.7.1
Component: Administration Keywords: needs-patch
Focuses: Cc:

The screenshot shows the output of four different posts in the Find Posts Modal. The last two post are correct, at the first and second post the post-type-label (e.g. cpt_example) is missing. The problem is the post-type parameter "public", if it is set to "false" the label will not be shown AND you will get the following PHP-Notice (if DEBUG is true):

Undefined index: cpt_example in ... /wp-admin/includes/ajax-actions.php on line 1803 Trying to get property of non-object in ... /wp-admin/includes/ajax-actions.php on line 1803

At the following code (1745 ff.) you will notice the reason of this issue: $post_types only includes public posts

true ), 'objects' ); ^^^^^^^^^^^^^^^^ The output of this modal shows all posts (public and unpublic), so i don't think that this "filter" was set for security reasons. In my opinion it must either show all posts correctly with their labels (which would be great) or it must suppress all "unpublic" posts completely.