Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#14392 closed defect (bug) (duplicate)

Incorrect Post Counts on Custom Taxonomies When Post is Deleted

Reported by: chrisvrichardson's profile chrisvrichardson Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.0
Component: Taxonomy Keywords: taxonomy, delete, trash
Focuses: Cc:


Post counts for terms in custom taxnomies do not seem to decrement when the post is first deleted (moved to the trash), only after the trash is emptied.

The issue seems to be present for both hierarchical and flat taxonomies.

To reproduce:

  1. Create a custom taxonomy.
  2. Create a term in the custom taxonomy
  3. Create a category
  4. Create a post and assign the custom taxonomy term to it. Also assign the category to it.
  5. Check the post counts on the 'categories' screen and the screen for your custom taxonomy. Both will show a count of 1 post.
  6. Delete the post
  7. The category post count on the 'categories' screen will decrement to '0'. Your custom taxonomy term, however, will still show '1'. Clicking on it will take you to the posts screen with a message that the post doesn't exist.
  8. Empty the trash. Your custom taxonomy term will now show a correct count of '0'.

This issue may be related to tickets 14084 and 14073, although neither of those seemed to address it directly.

Change History (3)

#1 @mfields
14 years ago

  • Cc michael@… added

#2 @scribu
14 years ago

  • Resolution set to duplicate
  • Status changed from new to closed

#3 @duck_
14 years ago

  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.