Skip to:
Content

bbPress.org

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#3376 closed defect (bug) (fixed)

Forum Category last active id, author id, and date metadata are not being updated when a reply is posted

Reported by: vbadham's profile vbadham Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6.6 Priority: normal
Severity: normal Version: 2.6.5
Component: Component - Replies Keywords: needs-testing
Cc: vbadham@…

Description

Using the latest bbPress plugin (bbPress 2.6.5). I believe line 954 of bbpress/includes/replies/function.php is not coded correctly. The current line is:

if ( bbp_is_reply_pending( $reply_id ) && ! bbp_is_topic_pending( $topic_id ) ) {

but it should be:

if ( ! bbp_is_reply_pending( $reply_id ) && ! bbp_is_topic_pending( $topic_id ) ) {

Note the "!" in the first if clause. The associated comment says "Only update if reply is published" but the current code will update the metadata only if the reply is pending.

To replicate the problem with the existing code, create a Forum category, add a forum to that category, add a topic to the forum, then add a reply. Wait a while to ensure some time has passed and then add another reply. Look at the forum and note the time of the last post for the forum. Then move up to the category and note the time of the last post. This one should be different and be the time of the first reply, not the second. The forum meta data is getting updated properly but the category metadata is not.

I believe that the solution to this issue is simply adding the "!" in front of the check that the reply is pending.

Change History (5)

#1 @johnjamesjacoby
5 years ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to 2.6.6
  • Owner set to johnjamesjacoby
  • Status changed from new to assigned

#2 @johnjamesjacoby
5 years ago

In 7095:

Replies: Correct inverted logic in bbp_update_reply_walker().

This commit fixes a bug causing Forum Category metadata to not be updated when publishing a reply.

Props vbadham.

In branches/2.6, for 2.6.6.

See #3376.

#3 @johnjamesjacoby
5 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 7096:

Replies: Correct inverted logic in bbp_update_reply_walker().

This commit fixes a bug causing Forum Category metadata to not be updated when publishing a reply.

Props vbadham.

In trunk, for 2.7.0.

Fixes #3376.

#4 @johnjamesjacoby
5 years ago

#3187 was marked as a duplicate.

#5 @johnjamesjacoby
4 years ago

#3356 was marked as a duplicate.

Note: See TracTickets for help on using tickets.