Deleting posts doesn't reset last activity date

We were having an issue with the auto-close feature where threads which have been dormant for a while weren’t being closed automatically (we have it set to close 30 days after the last activity). Doing some moderating, I have found that deleting the last post in a thread doesn’t reset the last activity date on the thread. So if a spammer wannabe comes in and lays down a crap post two months after the last post, we lose those two months for the auto-close functionality to work.

Edit: It seems to be the “Category” level dates/activity periods which are incorrect (see screenshots in post #3)

Example thread: http://community.sitepoint.com/t/javascript-add-css-to-style-wont-work/190090/18

Notice how the last post is actually May 20 (deleted post was made and deleted July 21)

This is the category page which shows the last activity period after the post was deleted. It still shows the relative time to the deleted post.

To recreate:

  1. Find an older post (say two months old) and add a post to the thread.
  2. Delete the post (I was using the delete spammer functionality but just deleting the post does it as well)
  3. Notice that the last activity date will still have the date/time of the deleted post, not the “old” last post.
2 Likes

If it was ‘Last Post’ I’d agree, but ‘Last Activity’? I’m not so sure :confused:

I was using the term in the category header - I don’t know how it’s actually stored. Last Post would be appropriate as well.

Regardless, the “in thread” dates look to be correct. It’s the In Category relationship which looks to be the one out of sync, and it seems to be the Category relationship which drives the auto-close and the thread display/sorting.

In thread:

In category (today)

Actually, it’s topics.bumped_at that you’re looking for :wink:

Would it be easy for it to use the “last reply” instead?

No, because bumped_at gets, ah, bumped for edits to the last post, and doesn’t get bumped for the topic closing.

But that is an answer to a different question…

This specifically states “last post” is X old. An edit doesn’t derive its age, the creation of its post initially derives its age

1 Like

This ancient issue is now neatly resolved using:

After deleting a post you can reset the bump date if you wish.

3 Likes