[wp-trac] [WordPress Trac] #10461: Multiple php notices from dashboard

WordPress Trac wp-trac at lists.automattic.com
Fri Mar 11 18:00:37 UTC 2011


#10461: Multiple php notices from dashboard
------------------------------+-----------------------
 Reporter:  mrmist            |       Owner:
     Type:  defect (bug)      |      Status:  reopened
 Priority:  normal            |   Milestone:
Component:  Warnings/Notices  |     Version:  3.1
 Severity:  normal            |  Resolution:
 Keywords:                    |
------------------------------+-----------------------

Comment (by sterlo):

 Opening the actual $post object:
 {{{
 stdClass Object
 (
     [ID] => 60
     [post_author] => 1
     [post_date] => 2011-01-28 19:46:23
     [post_date_gmt] => 2011-01-28 19:46:23
     [post_content] => CONTENT!
     [post_title] => I have it all!
     [post_excerpt] =>
     [post_status] => publish
     [comment_status] => open
     [ping_status] => open
     [post_password] =>
     [post_name] => i-have-it-all
     [to_ping] =>
     [pinged] =>
     [post_modified] => 2011-01-28 19:46:28
     [post_modified_gmt] => 2011-01-28 19:46:28
     [post_content_filtered] =>
     [post_parent] => 0
     [guid] => http://dev.wordpress.local/?post_type=staff_listing&p=60
     [menu_order] => 0
     [post_type] => staff_listing
     [post_mime_type] =>
     [comment_count] => 6
     [ancestors] => Array
         (
         )

     [filter] => raw
 )
 }}}

 I think the problem might be custom post types or custom taxonomies...

 So my custom post type in another plugin is creating:
 "?post_type=staff_listing".
 And this post does show "[post_type] => staff_listing". BUT the plugin
 that had created these comments...is de-activated.

 Activating the plugin resolves this issue.

 Sooo whats a viable solution? Telling a developer to clean up after the
 plugin (removing content just because of de-activation), OR having
 wordpress not pull data (e.g. comments) that are assigned to other data
 (e.g. post types) that don't exist?

 Old Code: Give me all comments.

 New Code: Give me all comments that are tied to existing objects.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10461#comment:4>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list