Skip to:
Content

bbPress.org

Opened 6 months ago

Closed 6 months ago

Last modified 6 months ago

#3376 closed defect (fixed)

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

Reported by: vbadham Owned by: 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 (4)

#1 @johnjamesjacoby
6 months 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
6 months 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
6 months 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
6 months ago

#3187 was marked as a duplicate.

Note: See TracTickets for help on using tickets.