#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: |
|
Owned by: |
|
---|---|---|---|
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.
In 7095: