Deleting posts doesn't reset last activity date

(David Maxwell) #1

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: JavaScript add CSS to style won't work? - JavaScript - The SitePoint Forums

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.

Resurrected topics should go away when last post is deleted

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

(David Maxwell) #3

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)

(Kane York) #4

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

(cpradio) #5

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

(Kane York) #6

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

(cpradio) #7

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