View Full Version : [fixed] Deleting copy deletes original's attachments
Doug Nelson
Tue 18th Jun '02, 2:29pm
There was already a thread on this, but it was closed to new posts.
Running 2.2.5
A mod copied a thread, then deleted the copy. Now all the attachments are gone from the original thread.
This was listed as a pre-2.0 bug, and a fix was promised. Never arrived?
eva2000
Tue 18th Jun '02, 3:00pm
any hacks installed ?
the lastest vB is 2.2.6 if after upgrading to 2.2.6 and it still doesn't fix it submit a support ticket or let us know
Doug Nelson
Thu 20th Jun '02, 5:05am
Ok, just upgraded to 2.2.6, zero hacks installed.
Created a new thread with one attachment
Copied that thread into another forum
Verified both threads were working properly, and that attachments had different id numbers
Deleted the copy thread (made sure it was the copy)
Went back to original. It was still there, but my test attachment was gone.
I don't know if it matters, but in options I have "allow duplicate attachments" set to "yes".
Am I the only one having this problem? Could someone else test this?
Doug Nelson
Fri 21st Jun '02, 6:32pm
Should this be moved to the 'bug reports' forum?
Steve Machol
Fri 21st Jun '02, 11:07pm
Confirmed on my test forum. Moving to Bugs.
Doug Nelson
Sat 22nd Jun '02, 1:43am
Thanks :)
Scott MacVicar
Wed 26th Jun '02, 9:42am
This is a bug in the SQL query in the deletethread function in /functions.php
Open up functions.php and change
AND NOT attachmentid IN ($omitattachmentids"."0)
to
AND attachmentid NOT IN ($omitattachmentids"."0)
Doug Nelson
Thu 27th Jun '02, 1:44pm
That fixed it. Thanks :)
Scott MacVicar
Thu 27th Jun '02, 9:35pm
After talking to mike I noticed it was a bug in the sql query and it was intended not to copy attachments to save space. Apply new fix from above.
Doug Nelson
Fri 28th Jun '02, 1:15am
Ok, here I thought it was all fixed, and then you lost me :)
Should I do this instead of the other one, in spite of the other one working?
When you copy a thread, it's not supposed to copy the attachments?
If I apply this one, should I revert the other one?
Scott MacVicar
Fri 28th Jun '02, 7:32am
Yes remove the changes in postings.php and add the code above.
The code was there to stop it deleting attachments though the sql statement was wrong.
Floris
Tue 9th Jul '02, 1:20am
I had this happen once to me, and I thought "erhm? didn't i just upload that one in another thread?" .. nice to see I wasn't brain damaged. Applying manual fix. Fnx!
vBulletin® v3.8.0 Release Candidate 1, Copyright ©2000-2008, Jelsoft Enterprises Ltd.