Skip to:

Opened 9 years ago

Closed 5 years ago

#2838 closed defect (bug) (fixed)

Forum, topic, and reply counts alongside pending topics and replies

Reported by: netweb's profile netweb Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6 Priority: normal
Severity: normal Version: trunk
Component: Component - Any/All Keywords: has-unit-tests needs-patch


Migrating here from the originally reported issue raised in #meta1140

Attachments (2)

2838-tests-01.diff (5.8 KB) - added by netweb 9 years ago.
Screen Shot 2019-11-07 at 1.44.38 PM.png (43.6 KB) - added by johnjamesjacoby 5 years ago.

Download all attachments as: .zip

Change History (14)

#1 @netweb
9 years ago

In [bbPress5870]:

Tests: Add topic voice count test test_bbp_get_topic_voice_count_with_pending_reply().

This test tests the voice count of a topic to ensure replies with post status pending are not included in the voice count until approved.

#2 @netweb
9 years ago

In [bbPress5871]:

Tests: Add forum last active id test test_bbp_get_forum_last_active_id_with_pending_reply().

This test tests the forums last active id to ensure replies with post status pending are not used as the forums last active id until the reply is approved.

9 years ago

#3 @netweb
9 years ago

The 2838-tests-01.diff patch is the first in a series of failing unit tests that should pass to resolve this ticket.

This patch covers bbp_get_topic_freshness_link() and the following reply actions:

  • bbp_trashed_reply()
  • bbp_untrashed_reply()
  • bbp_spammed_reply()
  • bbp_unspammed_reply()
  • bbp_approved_reply()
  • bbp_unapproved_reply()

#4 @netweb
9 years ago

In 5880:

Replies: In bbp_update_reply_walker() always update the topics last active time with bbp_update_topic_last_active_time() regardless of reply's published status.

This changeset including unit tests ensures that when calling reply actions spam/unspam, trash/untrash, approve/unapprove the reply's parent topic's last active time is updated to the time of the last published reply.

Props netweb. See #2838

#5 @netweb
9 years ago

  • Milestone changed from Under Consideration to 2.6

#6 @netweb
8 years ago

  • Keywords has-unit-tests added; needs-testing needs-unit-tests removed
  • Resolution set to fixed
  • Status changed from new to closed

#7 @johnjamesjacoby
5 years ago

Assigning all closed & unassigned tickets in the 2.6 milestone to myself.

#8 @johnjamesjacoby
5 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Still seeing this as an issue, specifically when topics & replies hit moderation and are marked as Pending.

#9 @johnjamesjacoby
5 years ago

  • Keywords needs-patch added
  • Owner set to johnjamesjacoby
  • Status changed from reopened to assigned

Assigning to self, needs patch (will upload soon...)

#10 @johnjamesjacoby
5 years ago

Somewhat difficult to understand from a single screenshot, but here's the topic description showing that the JJJ user (Keymaster) replied to a Pending Topic (one of the +2 hidden ones.)

Somewhat of an edgecase, but I don't feel like any replies to a pending topic should bump the counts or the last activity time, at least until the topic is approved.

Last edited 5 years ago by johnjamesjacoby (previous) (diff)

#11 @johnjamesjacoby
5 years ago

In 6923:

Counts (meta-data): full audit of forum/topic/reply, public/non-public counts.

This commit is the result of a full count audit, exposing multiple inconsistencies and voids in relation to how public and non-public counts are (re)calculated.

For instance, hidden forum replies are not counted at all, until now. By introducing a new Repair tool, hidden forum reply counts are now counted.

In addition, there were multiple bugs with topic & reply moderation, where the act of approving or unapproving topics or replies would cause the numbers to be inaccurate, or where topics & replies being caught in moderation were still increasing public counts.

It was also possible to, as a Key Master, publicly reply to unapproved topics, which was a completely unanticipated side-effect of allowing Key Masters to do pretty much anything. Going forward, the default reply status is the topic status, but is still beholden to all existing moderation settings and user role capabilities. This results in a more sane user experience, and prevents the unusual circumstance of there being "0 topics and 30 replies" in public-facing forums.

Certain count increase/decrease actions have been reprioritized to avoid collisions and race conditions, proving once again that ya gotta get up to get down.

See #2838. Fixes #1799.

#12 @johnjamesjacoby
5 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed
Note: See TracTickets for help on using tickets.