Skip to:

Opened 11 years ago

Closed 8 years ago

Last modified 8 years ago

#2414 closed defect (bug) (fixed)

Incorrect freshness author and timestamp on blog discussion thread

Reported by: sadr's profile Sadr Owned by: netweb's profile netweb
Milestone: 2.5.9 Priority: normal
Severity: normal Version: 2.5.8
Component: Component - Replies Keywords: has-patch
Cc: e., stephen@…, unsalkorkmaz@…, info@…


I noticed some weirdness with the special thread that's being used for blog-comments on

Instead of showing the last poster under "Freshness", it shows JJJ with some arbitrary time stamp.

Furthermore, the date link doesn't point to the latest post in the thread like it's supposed to.,rxHo9wS

Attachments (4)

bbpress-freshness-error.png (71.7 KB) - added by Sadr 11 years ago.
bbpress-freshness-error2.png (65.9 KB) - added by Sadr 11 years ago.
2414-1Year8Months.PNG (16.5 KB) - added by netweb 10 years ago.
2414.diff (494 bytes) - added by boonebgorges 8 years ago.

Download all attachments as: .zip

Change History (28)

#1 @netweb
11 years ago

I just bumped the topic and deleted my post. The 'last poster' is now showing correctly and the the 'freshness' displays the time of my now deleted reply.

I have seen this a few times and typically is after removing a spam reply in a topic where the counts are not getting recalculated after a 'spam' or 'trash' action is performed.

There is an admin tool to recalculate 'all these things', maybe we need a moderator option so that mod's can recalculate an individual topic...

#2 @netweb
11 years ago

  • Cc stephen@… added

#3 @netweb
11 years ago

Hmmm... Now when I look at the 'last poster' is again listed as 'John James Jacoby' with a freshness of '3 hours, 20 minutes ago' which would be approx the time that I posted and deleted my 'bump' reply as detailed above in 'comment 1'.

Yet a new reply has been posted 47 minutes ago (at the time of this comment) yet the main forum page topics freshness for this latest reply has not updated the correct 'last poster' or 'freshness'.

#4 @Sadr
11 years ago

  • Cc e.soghe@… added

#6 @unsalkorkmaz
11 years ago

  • Cc unsalkorkmaz@… added

#7 in reply to: ↑ 5 ; follow-up: @johnjamesjacoby
11 years ago

Replying to unsalkorkmaz:

this is probably related with

That ticket doesn't mention anything to do with freshness dates. Can you explain what's led you to this conclusion?

My guess is it's related to cache invalidation, and/or a race condition because of our multi-server setup here. Either way it needs addressing, but it seems unlikely to be related to #2397 imo.

#8 in reply to: ↑ 7 @unsalkorkmaz
11 years ago

I said "probably" because "maybe" its related to wrong order i mention in basically its not make sense at all. Dunno, "probably" it can be unrelated too.

#9 @johnjamesjacoby
11 years ago

  • Keywords needs-testing added
  • Milestone changed from Awaiting Review to

Putting in the milestone to clear out awaiting review. I'll look into this soon.

#10 @netweb
10 years ago

I'll add related #1925 :) If the current patch there does what I hope it does correctly then the freshness issue and calculating freshness will also be resolved :)

#11 @netweb
10 years ago

Another related issue to this are topics that have 0 voices and 0 replies and are 1 year 8 months ago.

I haven't been able to pinpoint the significance of the '1 year 8 months ago' though I think no doubt that is a hint.

There are no spam or trash replies on the below topic either.

A quick fix is to to use the mod tool to recount the topic and all is well again.

#12 @netweb
10 years ago

I just noticed that "Last reply from: username" is missing from the "Topic Info" sidebar.

It looks like these topics are not getting one/some/all of the following meta keys:
_bbp_last_active_id / _bbp_last_active_time / _bbp_last_reply_id

#13 @netweb
10 years ago

'1 year 8 months ago' timestamp has now become to '1 year, 9 months ago' making this mystery ~ JUN/JUL 2012 :/

#14 @netweb
10 years ago

A new month with an added month 'Last activity: 1 year, 10 months ago'

#15 @Ziga Sancin
9 years ago

  • Cc info@… added

I'm seeing some weird freshness bugs on a bbpress installation (version 2.5.5), so I guess this is not just a bug like the component states. However, I'm using a different forum structure (a forum index, subforums, etc. - a traditional phpbb layout), so the bug is even more visible to the general public.

I've tried using the admin tool to recalculate freshness, but it makes the whole situation worse. So, I have to manually change the freshness postmetas of all forums and subforums. :(

I've encountered at least three different bugs:

  • wrong freshness set for parent forum and subforums after trashing a post
  • wrong freshness set for forums and subforums after using freshness recalculation via admin tools
  • no updated freshness set for parent forum and subforums after untrashing a post

This seems like a blocker to me. How can I help? Are those bugs covered inside this bug or bug #1925?

Last edited 9 years ago by Ziga Sancin (previous) (diff)

#16 @netweb
9 years ago


The issue here is very specific to the site only with the customised code we use in our theme there.

I'd suggest taking a quick look at the following open tickets and see if anything seems relevent:

If you using the custom phpBB layout code from the forums you should take a close look in that, it hasn't been updated in quite a while and has some issues that are known but not fixed, I'd suggest posting on the support forum for this as I'm sure others would potentially be affected by this also.

#17 @Ziga Sancin
9 years ago

Thanks for your quick response, Stephen!

Sure, I understand that there is a customized theme code at, but you're still having trouble with postmeta values for _bbp_last_active_id / _bbp_last_active_time / _bbp_last_reply_id. Those values are wrong or missing in my database after deleting a post or recalculating freshness via admin tools, so the phpBB layout just makes it more evident to the average user (it's certainly not the cause of these bugs, because I can easily reproduce the bug just by clicking on the trash link in the frontend or WordPress Admin and looking at the postmeta database).

Last edited 9 years ago by Ziga Sancin (previous) (diff)

#18 @netweb
9 years ago

Ziga, this isn't a support forum, please post on the support forum, if it is determined to be a bug in bbPress then we'll direct you to create a ticket here on Trac, but until then please have this discussion on the forum thanks.

#19 @Ziga Sancin
9 years ago

Oops, sorry.

#20 @Sadr
9 years ago

  • Cc e.soghe@… removed

8 years ago

#21 @boonebgorges
8 years ago

  • Component changed from Site - to Component - Replies
  • Keywords has-patch added; needs-testing removed
  • Milestone changed from to 2.5.9
  • Severity changed from minor to normal
  • Version changed from trunk to 2.5.8

Ran into this problem on a client site. With some help from @mauteri, I think I managed to track down the culprit. You can run the stack trace for yourself to get the full story. The tl;dr is in 2414.diff: overzealous type coercion caused bbp_forum_query_last_reply_id() to skip the database query in every instance (since 0 is never === false). As such, the resetting of _bbp_last_reply_id got short-circuted in some cases, causing weird bugs like the one in this ticket.

I see that the caching has been removed, and the bug inadvertently fixed, in bbPress trunk [5954]. But I think this bug is annoying enough, with a straightforward enough fix, that it ought to be considered for the 2.5.x series.

#22 @netweb
8 years ago

  • Owner set to netweb
  • Resolution set to fixed
  • Status changed from new to closed

In 6020:

Forums: Overzealous type coercion caused bbp_forum_query_last_reply_id() to skip the database query in every instance (since 0 is never === false). As such, the resetting of _bbp_last_reply_id got short-circuted in some cases.

This fix is for the 2.5 branch, /trunk fixed this inadvertantly in [5954]

Props boonebgorges, mauteri.
Fixes #2414.

This ticket was mentioned in Slack in #bbpress by bisi. View the logs.

8 years ago

#24 @fuskeren
8 years ago

This still does happen to me, with all addons disabled + bbpress 2.6-alpha.

Last edited 8 years ago by fuskeren (previous) (diff)
Note: See TracTickets for help on using tickets.