Closed Bug 377087 Opened 17 years ago Closed 6 years ago

Can't delete attachments( multipart/alternative[ text/plain + multipart/mixed{ text/html + application/msword + text/html } ], which part can be a real attachment of a mail? )

Categories

(MailNews Core :: Attachments, defect)

1.9.1 Branch
x86
Windows Vista
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: dkey211, Unassigned)

References

Details

(Keywords: testcase)

Attachments

(2 files)

User-Agent:       Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)
Build Identifier: 1.5.0.10

I'm using thunderbird with Vista. Detach and Delete attachments does not work. My only option is to delete the entire message.

Reproducible: Always

Steps to Reproduce:
1. open message
2. right click attachment
3 [review]. select delete from popup window
Actual Results:  
nothing happens

Expected Results:  
attachments don't disappear

attachments should disappear
Do you still see this with a 2.0 rc?
<http://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/2.0.0.0-candidates/>

If you do: IMAP or POP? Any particular msg? Errors int the error console?
Using POP, the javascript console does not display any related errors.
POP settings are default.
What is a 2.0 rc?
Release candidate for thunderbird 2.0, you can download it from the link i gave and see if the problem is still there.

(also make sure the attachment is not already detached - if it is, it won't work)
I just installed release candidate 2.0 and the attachments in T-bird appear slightly different, however the attachments are still there and won't delete.
Do you still see this bug with the final version of Thunderbird 2.0?  You can download it from <http://www.mozilla.com/en-US/thunderbird/>.

I have tested the detach and delete functions on IMAP, POP and Local folders.  Detach works correctly on all types of mail servers, however the attachment display is not updated to show that the attachment was detached (see Bug 292385).  The delete options are still enabled once an attachment is detached.

Reporter: Are you trying to delete an attachment that has already been detached? Look in the message source (View -> Message Source) for a line that starts with "X-Mozilla-Altered: AttachmentDetached;"  If this is the case, this is a duplicate of Bug 333904.
I can reproduce this, Windoze XP, TB 2.0.0.14 and latest 3.0rc.  Doesn't happen with all attachments but reliably with some. I can send you a saved message that does this for me.

In passing, where has "delete all" gone for attachment handling in TB3.0?  It would be a real mistake to lose that and would inhibit me from upgrading.
See bug 390071 for the save/delete/detach all.
Assignee: mscott → nobody
I believe this bug could be a dupe of bug 351224.
Whiteboard: DUPEME
I'm not sure this is the same as bug 351224, though perhaps similar.  In my experience the inability to delete attachments occurs only with e-mails sent from Mac computers (Apple Mail ?).  The only present solution is to delete the entire message, which is often not acceptable.
(In reply to comment #10)
> I'm not sure this is the same as bug 351224, though perhaps similar.  In my
> experience the inability to delete attachments occurs only with e-mails sent
> from Mac computers (Apple Mail ?).  The only present solution is to delete the
> entire message, which is often not acceptable.

Can you share with us one of those message that can't have their attachment deleted (save the message as .eml - and then you can either email it to me or attach it to this bug - attachement solution prefered.)
I have tried attaching a message as requested, but the .eml file is too large for Bugzilla to accept (>2048KB).  I'll try to find another e-mail with smaller/fewer attachments and have another go.
This is an e-mail from a colleague who uses a Mac.  I am never able to delete attachments from e-mails he sends.  This problem does not arise with all Macs.

I have attempted to delete the attachment from this e-mail, but at the end of the process the attachment is still shown at the bottom of the e-mail, and the size hasn't decreased, so I must assume it hasn't deleted.
Tim what version of Tb are you using ?
Component: Mail Window Front End → Attachments
Keywords: testcase
Product: Thunderbird → MailNews Core
QA Contact: front-end → attachments
Whiteboard: DUPEME
I can confirm behaviour described in comment #13 using testcase.

Here "Delete" not work (in both files).

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.2pre) Gecko/20090721 Lightning/1.0pre Shredder/3.0b4pre ID:20090721034342

No messages in error console.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(In reply to comment #14)
> Tim what version of Tb are you using ?

I'm using TB 2.0.11

My colleague whose attachments I can't delete says: I use Mail on mac. OS X 10.4
Version: unspecified → 1.8 Branch
Version: 1.8 Branch → 1.9.1 Branch
Para 2 of the original Description in Bug 470882 states that the problem arises if the cursor isn't placed on the Attachment's icon, and that the warning message won't contain the name of the attachment to be deleted.  I am placing the cursor firmly on the Attachment name, and that name IS being listed in the warning message.  But it's still not being deleted.

So this bug may be similar to 470882, but isn't identical.
The inability to even invoke the attachment deletion function is history dependent.  Often when I open a message containing multiple attachments and right click in a blank area of the part of the message pane showing the attachment icons, the DELETE/DETACH/SAVE ALL functions are disabled even though there are multiple attachments.  But sometimes they are not disabled.  There are 2 ways I've found to overcome this so that the ALL functions will be enabled: (1) before opening the message, left click on the name of the folder in the left FOLDER pane; (2) right click on one of the individual attachment icons to display the context menu which will show the SAVE/DELETE/DETACH (individual attachment) commands enabled and the ALL commands disabled.  Next left click in the empty space to deselect the individual attachment.  Now right click in the empty space to display the context menu.  At this point the ALL commands will be re-enabled and you will be able to SAVE/DETACH/DELETE ALL.

But wait... There's more!  (Operators are standing by):  If there are many many attachments, the list of attachments will scroll the CONFIRM DELETION button off the screen and after all attachments have been saved/detached or deleted, you will not be able to complete the operation because the CONFIRM button will be below the bottom of the screen.  Yes, I suppose I should probably file another bug report for this.
I think S. Kerman is reporting an entirely different bug, which I have not experienced.  Bug 377087 seems to have been with us for over two years, persisting through several versions of TB.
I have just found a good e.g. of this bug.  It's a message sent by someone using "X-mailer: Apple Mail (2.935.3)", Mime-Version: "1.0 (Apple Message framework v935.3)" with Content-Type: "multipart/alternative; boundary=Apple-Mail-3-746975842" (Hm, is there a wishlist item in for better handling of headers: scrolling and better copying from them would be nice!)

I can send it to someone who is working on this, there's nothing confidential in the message and the guy who sent it will probably be happy to work with you to help solve this.  How do I send the saved EML file?  (Im' using the www buzilla interface and can't see an option to add an attachment to this).  

Thanks, Chris
(In reply to comment #21)

> to help solve this.  How do I send the saved EML file?  (Im' using the www
> buzilla interface and can't see an option to add an attachment to this).  
> 

Just above all these text and the already attached testcase you have a link called add attachment - just click on it.
(In reply to comment #13)
> Created an attachment (id = 389702)
> e-mail with attachment which I can't delete

Mail structure is as follows.
> Content-Type: multipart/alternative;
> part-1 : ( Mail Body if "Plain Text" )
>          Content-Type: text/plain;
> part-2 : ( Mail Body if "Original HTML"/"Simple HTML" )
>          Content-Type: multipart/mixed;
>          part-1-1 : Content-Type: text/html;
>          part-1-2 : Content-Type: application/msword;
>                     Content-Disposition: attachment; filename=-PhotoComp-R&A-PR.doc
>          part-1-3 : Content-Type: text/html;

Because multipart/alternative, whole part-2(multipart/mixed) is Mail_Body of multipart/alternative mail, when View/Message Body As/Original HTML.
Non-displayed part-1-2(application/msword) in Mail_Body(multipart/mixed in multipart/alternative) is attachment of mail?

Similar issue to Bug 351224, but slightly different issue is involved because this bug is for multipart/mixed case. Each part in multipart/related is apparently not attachment, but attachment or not is unclear when a part in multipart/mixed in multipart/alternative.
This is an e.g. of a post with attachments I can't delete, see my post from a day or so ago.
I can confirm that the inability to delete attachments sent to me from Apple Mail users seems robust and present in Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1.  I think it has been present in TB for a long time.  Please can we have a fix?
Summary: Can't delete attachments → Can't delete attachments( multipart/alternative[ text/plain + multipart/mixed{ text/html + application/msword + text/html } ], which part can be a real attachment of a mail? )
I periodically go through mailbox folders checking for large attachments, and find I sometimes can't them. TB (3.1.9, Windows 7 32bit) went through the motions and gave no error, but the attachments remained attached. Small single attachments seem to delete OK, but very large attachments often fail, as do  multiple attachments of reasonable size. I ultimately delete the entire message, which goes into Trash normally (with its attachment(s)).
Another delete-attachments issue... I tried to delete a single 12MB .ppt attachment from an archived message, and the entire message disappeared. It wasn't in the trash folder, as happens if you delete the message "normally" -- it is nowhere to be found.
I experience this frequently and believe it is related to the sender's mode of attachment and the mail client they use, and nothing to do with the size of the attachment.  The problem occurs most frequently with messages sent by Mac and iPhone users.  

IME it generally happens with JPGs.  I don't recall it happening with other attachment types. It may also be related to whether the JPG was attached vs inserted or pasted inline into the text message body.

I have assigned a tag name "attachment won't delete" and color so as to avoid repeated attempts to remove attachments.  I have also taken to filing these messages in a specific folder so that I can go back and clean them up once teh bug is fixed.

I have also, with the help of some of the people whose messages exhibit this problem, experimented with different attachment modes and plain text VS HTML message formats to see which combinations of modes exhibit the problem.  So I have examples of messages that were essentially the same until the deletion succeeded on some and failed on other copies of the same message.  Since I did this months ago I am not in a position at this moment to summarize my findings.
I can (again) confirm that on my version (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 on Win XP sp3) that this seems to be 100% replicable with pretty much any message sent with an attachment from someone running Apple Mail.  Since that's what my wife now uses I can very easily do any sorts of testing and it means that my Email archive is increasingly taking up huge amounts of disc space it doesn't need to.  I have posted an example message that caused this on my system.  This bug report has been alive for a year and hasn't even been adopted yet I think it goes back way before 2010.  I desperately don't want to give up my allegiance to open source or an Email client that in its early days was good and with its global search, has potential, but it feels as if the TB project is in a very dire state when bugs like this are untouched as new versions come and go.  I have voted for this bug but can't see how to increase my votes.  I would pledge some money to get a fix too and begin to think that TB desperately needs a pledging system. Please would others add their votes and please can we have some feedback from the TB team on how to shift this and other bugs along?
I entirely agree with Chris Evans about this. I've been reporting it on and off for mearly two years, and the result is zilch.
However, I have found a way to delete the attachment, but you have to know your way around a multi-part message to do it.  If you go to 'View -> Message Source' the attacment will be seen as a load of hex code. Highlight and delete. I DO NOT recommend doing this unless you are confident to can identify the attachment, so I'm conscious it's not a solution for everyone.
Maybe I missed something.  In Thunderbird 2.0.0.24 under WXP VIEW SOURCE, the CUT and DELETE tools remain disabled even after selecting a portion of the message body.  Only the selection and COPY commands function.  What version are you referring to?
Same in TB 3.1.9. I don't think you can alter any message while it's in the Inbox. If you View->Message Source, the "Delete Message" option under Edit changes to "Delete" but doesn't do anything.
No, you are right. I had forgotten that what I actually did was more
complicated. I've just done it again.
I copied the message into an otherwise empty TB folder, and opened that folder
in a programming editor (UltraEdit). Because there's only one message in the
folder it looks much like 'View Source'. Then I deleted the attachment and
saved. When I viewed the message again in TB the attachment name still showed
at the bottom of the pane, but when I tried to open it, it was 'empty'. When I
repeated the process (with a new copy of the original message) and removed the
entire 'multi-part' (HTML), all reference to the attachment was gone. The file
size was reduced from 22KB to 5KB (it was only a small text file attached, in
this case).
This is a tedious process, and not one I'd care to do very often.

All of which emphasises the importance of getting this bug fixed.
(In reply to comment #35)

> This is a tedious process, and not one I'd care to do very often.
> 
> All of which emphasises the importance of getting this bug fixed.

Right. If I were going to go to all that trouble, I think I'd also look into duplicating TB's formatting of the deleted attachment (when it does, on occasion, work properly). I find that continued reminder that the attachment did once exist to be very useful.
I agree.  It's quite important to be able to see not only that there *was* an attachment that was removed, but its name, especially to see what files you sent to others.  

Being able to see the file names is less useful for incoming messages since incoming attachments often have meaningless file names that have to be changed for the files to be recognizable with regard to their content.
Well it would be nice of course. But 'all that trouble' is something done in desperation to get rid of massive attachments cluttering up my TB, I have no real interest in trying to make it normal behaviour, and fortunately for me I don't get many e-mails from Apple users.

However, you'll have noted that I explained that at my first attempt the attachment still appeared to be present (i.e the 'label' was still there), even though the attachment was gone. I think that you could probably modify that 'label' text to say anything you wished. It needs a bit of experimentation. But I'm just a TB user, not a programmer.

BTW TB isn't all that clever. I had an e-mail client that would tell me where I'd saved the attachment. Now that was really useful. If there's an add-on that does that, please someone let me know.
Since you asked, if you edit the line that says 'Content-Disposition: attachment; filename=" filename.typ"' to read 'Content-Disposition: attachment; filename=" what ever you type"' You'll get what you type shown as the attachment 'name'.
For example:
'Content-Disposition: attachment; filename=" file saved as mydocs/cooking/Almond Crisps.doc"' OR
'Content-Disposition: attachment; filename=" deleted: was Almond Crisps.doc"'
(In reply to comment #29)
> Another delete-attachments issue... I tried to delete a single 12MB .ppt
> attachment from an archived message, and the entire message disappeared. It
> wasn't in the trash folder, as happens if you delete the message "normally"
> -- it is nowhere to be found.

Mea culpa dept... it just dawned on me that usually when I'm deleteing messages and attachments in the archive, I'm sorting by size. When I delete a 12MB attachment, the message becomes that much smaller and it moves waaay up in the list, thus "disappearing". Recently checked several suchmessages and they were still in the archive, absent the attachments. Bottom line: ignore this (#29) comment.
Everyone, please update to the most recent version of TB (currently TB6).
The attachment panel has received a lot of care n fixes by Jim, these fixes will start to show up beginning with TB8 (currently in aurora channel, and stable).

(In reply to Tim Dawson from comment #38)

> However, you'll have noted that I explained that at my first attempt the
> attachment still appeared to be present (i.e the 'label' was still there),
> even though the attachment was gone.

Bug 292385? Bug 305485?
 
> BTW TB isn't all that clever. I had an e-mail client that would tell me
> where I'd saved the attachment. Now that was really useful. If there's an
> add-on that does that, please someone let me know.

You can use TB's "detach" command which will do the following:
- save the attachment
- delete the attachment from TB
- remember the file's location in TB
- link to that location from the attachment icon (double-click will open the file from your file system)
(In reply to S. Kerman from comment #33)
> Maybe I missed something.  In Thunderbird 2.0.0.24 under WXP VIEW SOURCE,

Kerman, pls update to TB6. TB2 is no longer supported.
Tested by mailing both testcase to myself. WFM on 58.0b1
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: