FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » File attachments and deleted messages
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
File attachments and deleted messages [message #33600] Sat, 09 September 2006 01:50 Go to next message
jcarter is currently offline  jcarter   United States
Messages: 25
Registered: August 2006
Karma: 0
Junior Member
FUDforum 2.7.5

I had a forum where the messages contained many attachments. I had to delete the group and recreated it by importing from the original NNTP source.

It appears the deleting the forum, then deleting the messages did not remove the attachments. Now for each message with an attachment, it also shows all the orphan attachments from the previous forum's existance. I tried running a Forum Consistency check but it did not correct the condition.

How do I purge the orphan attachments?
Re: File attachments and deleted messages [message #33625 is a reply to message #33600] Mon, 11 September 2006 13:44 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Did you delete the original forum? The only way what you've described may have happened is if your message id returned to previous values, allowing the file association to re-occur.

Normally consistency checker will remove any orphan file attachments.


FUDforum Core Developer
Re: File attachments and deleted messages [message #33654 is a reply to message #33600] Tue, 12 September 2006 02:22 Go to previous messageGo to next message
jcarter is currently offline  jcarter   United States
Messages: 25
Registered: August 2006
Karma: 0
Junior Member
Quote:

Did you delete the original forum? The only way what you've described may have happened is if your message id returned to previous values, allowing the file association to re-occur


I have re-deleted the original forum and deleted all messages. Then I ran the consistency checker. Looking in /var/www/FUDForumData/files, I see 2 copies of many of the attachments that were in that forum. Rerunning the consistency checker doesn't pick up any abnormalities.
Re: File attachments and deleted messages [message #33664 is a reply to message #33654] Tue, 12 September 2006 14:45 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
When you deleted the forum did you remove it from the forum trashbin? I think you didn't because otherwise the consistency checker would've picked up on the orphaned attachments and removed them from both the DB and disk.

FUDforum Core Developer
Re: File attachments and deleted messages [message #33668 is a reply to message #33600] Tue, 12 September 2006 17:07 Go to previous messageGo to next message
jcarter is currently offline  jcarter   United States
Messages: 25
Registered: August 2006
Karma: 0
Junior Member
I picked 'Deleted Forums', then under 'Orphaned forums', I selected to delete the messages. Is there a simple way I can check the database to see what the attachments in the fud_attach table are linked to?
Re: File attachments and deleted messages [message #33688 is a reply to message #33668] Thu, 14 September 2006 19:01 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
You can run a join statement between the attachment table and the messages table and finally the topic table. From the topic table you can use the forum_id field to identify the forums.

FUDforum Core Developer
Re: File attachments and deleted messages [message #33772 is a reply to message #33688] Wed, 20 September 2006 17:14 Go to previous messageGo to next message
jcarter is currently offline  jcarter   United States
Messages: 25
Registered: August 2006
Karma: 0
Junior Member
It turns out that my analysis was wrong. I was misled because it appears that deleting forum messages and emptying the trashcan does not remove the physical file from the disk.

The real problem is that during an NNTP import session, the attachments are applied to the correct message, then also to all following messages which have attachments. For example - looking at the attach_cnt column in a forum which was imported from a newsgroup-

Msg #1 has 1 attachment: attach_cnt = 1
Msg #5 has 1 attachment: attach_cnt= 2
Msg #8 has 5 attachments: attach_cnt = 7
msg #12 has 1 attachment: attach_cnt = 8
...
msg #250 has 1 attachment: attach_cnt = 53
msg #260 has 1 attachment: attach_cnt = 54

Looking at msg #260 confirms that all 54 attachments shown are for previous messages in that NNTP import session.

[Updated on: Wed, 20 September 2006 18:50]

Report message to a moderator

Re: File attachments and deleted messages [message #33788 is a reply to message #33772] Thu, 21 September 2006 22:01 Go to previous messageGo to next message
Ilia is currently offline  Ilia   United States
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Fixed in CVS, here is the patch:
http://cvs.prohost.org/c/index.cgi/FUDforum/chngview?cn=11602


FUDforum Core Developer
Re: File attachments and deleted messages [message #33830 is a reply to message #33788] Fri, 22 September 2006 21:06 Go to previous messageGo to next message
jcarter is currently offline  jcarter   United States
Messages: 25
Registered: August 2006
Karma: 0
Junior Member
This CVS patch fixes it. Thanks!
icon14.gif  Re: File attachments and deleted messages [message #33831 is a reply to message #33830] Fri, 22 September 2006 21:18 Go to previous message
jcarter is currently offline  jcarter   United States
Messages: 25
Registered: August 2006
Karma: 0
Junior Member
....Donation for FUDforum sent Smile
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: script interface created users have Topics per page unset
Next Topic: Signature seperator wrong...
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Nov 27 05:02:09 GMT 2024

Total time taken to generate the page: 0.02526 seconds