[wp-trac] [WordPress Trac] #16956: Comments Being Pulled from Non-Existent Post Types

WordPress Trac noreply at wordpress.org
Wed May 13 04:51:16 UTC 2015


#16956: Comments Being Pulled from Non-Existent Post Types
----------------------------------------+-----------------------------
 Reporter:  sterlo                      |       Owner:
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Future Release
Component:  Posts, Post Types           |     Version:  3.1
 Severity:  normal                      |  Resolution:
 Keywords:  has-patch commit 4.1-early  |     Focuses:
----------------------------------------+-----------------------------

Comment (by codeelite):

 New to this, not sure how to add those .diff files to attachment..sorry,
 I currently got lots of notice in wp-admin dashboard, the problem was the
 previous plugin is installing some custom post types, and when I
 deactivate this plugin I got lots of notice, such as..

 {{{
 Trying to get property of non-object in /wp-includes/capabilities.php in
 line 1159.. etc
 }}}

 so.. I added simple check to capabilities.php - function map_meta_cap()
 {{{
 post_type_exists($post->post_type)
 }}}
 and all notice are gone. Not sure if this change will take affect into
 another WP features, but for now all is good, can't see any warning or
 notice in my dashboard.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/16956#comment:33>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list