[wp-trac] [WordPress Trac] #53443: The value of the `post_count` meta field is wrong because it doesn't get decremented when a post is deleted

WordPress Trac noreply at wordpress.org
Tue Nov 16 19:38:43 UTC 2021


#53443: The value of the `post_count` meta field is wrong because it doesn't get
decremented when a post is deleted
--------------------------------------+------------------------
 Reporter:  henry.wright              |       Owner:  h
     Type:  defect (bug)              |      Status:  assigned
 Priority:  normal                    |   Milestone:  5.9
Component:  Posts, Post Types         |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  multisite
--------------------------------------+------------------------

Comment (by henry.wright):

 For the failing tests, do we need to create a blog and switch to it before
 the assertions are run?

 {{{
 $blog_id = self::factory()->blog->create();
 switch_to_blog( $blog_id );
 }}}

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


More information about the wp-trac mailing list