Skip to:
Content

Opened 3 years ago

Last modified 23 months ago

#2944 new defect

Forum and topic `_bbp_count_*` meta keys are not deleted when trashing a forum

Reported by: netweb Owned by: johnjamesjacoby
Milestone: 2.7 Priority: high
Severity: normal Version:
Component: Component - Any/All Keywords: needs-patch needs-unit-tests early
Cc:

Description

Repro:

  • 1. Create a forum Test, a topic Test in the Test forum and finally create a reply to Test topic
    • Results in a forum post (and revision), a topic, and a reply in wp_posts
    • Results in the following in wp_postmeta
    • https://cldup.com/inUzgKZ5Hu.png
  • 2. Trash the forum and empty the trash
    • Results in both the forum post and the revision, the topic, and the reply deleted from wp_posts and works as expected.
    • Results in the following forum and topic meta not deleted:
    • https://cldup.com/D8bRbk6tsU.png

Each of the following forum and topic _bbp_count* meta keys should be deleted when trashing a forum just as it currently does and works expected for the forum and topic for _bbp_last* and _bbp_*_id meta keys

Forum meta

  • _bbp_reply_count
  • _bbp_total_reply_count
  • _bbp_forum_subforum_count
  • _bbp_topic_count
  • _bbp_total_topic_count
  • _bbp_topic_count_hidden

Topic Meta

  • _bbp_voice_count
  • _bbp_reply_count
  • _bbp_reply_count_hidden

Note: The above tables post_id's 1 was the forum, 3 was the topic, and 8 was the reply

Change History (1)

#1 @johnjamesjacoby
23 months ago

  • Keywords early added
  • Milestone changed from Under Consideration to 2.7
  • Owner set to johnjamesjacoby
  • Priority changed from normal to high

I wonder if this is still the case. We should be able to write good tests for this, and get it into 2.7 early.

Note: See TracTickets for help on using tickets.