• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Not a bug Soft deleted threads delete attachments

AndyB

Well-known member
#1
When a member soft deletes a thread it appears that attachments contained in that thread are physically deleted. The attachments should not be physically deleted until the thread is physically deleted so in case we want to restore a soft deleted thread with attachments, the entire thread can be restored including attachments.
 

Mike

XenForo developer
Staff member
#2
I can't reproduce this and I don't see how it could happen - the attachments are only actually deleted when we remove the messages.
 

AndyB

Well-known member
#4
It appears the member before soft deleting the thread actually deleted the attachment but left the attach code in the message. This had me worried there was a bug. Sorry for the incorrect bug report.
 

Rudy

Well-known member
#5
I can't reproduce this and I don't see how it could happen - the attachments are only actually deleted when we remove the messages.
A related question: does hard deleting remove attachments? We have a user that was posting dozens of images per day, all off-topic, and we already issued the warning and took away the attachment privileges. But we want to clean up the attachments.

If not I may have to poke around and find an easy way to delete all of those attachments based on user ID...
 

Rudy

Well-known member
#7
Yes, a routine cron will clean those up.
...after what else happens? After a hard delete, or a soft delete?

My only drawback to using hard deletes is that we keep offending posts soft-deleted for future evidence in dealing with warnings, etc.