Re-opening a draft for editing messes up the e-mail formatting

RESOLVED DUPLICATE of bug 307023

Status

--
major
RESOLVED DUPLICATE of bug 307023
13 years ago
12 years ago

People

(Reporter: nospam, Assigned: mscott)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

13 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Build Identifier: Thunderbird 1.5 (20051201)

When you edit an HTML e-mail, add different font sizes, styles, alignments, graphical emoticons and a page background image to it, then save it as a draft, everything's fine. In the draft view. But if you re-open that message again to edit and eventually send it, the design is totally unusable. The paragraph alignments are all gone, so are the graphical emoticons (they're replaced by their plaintext representation plus some spaces) and the page background is now plain yellow (which really hurts in my eyes). I guess something's badly broken there, didn't test it before as I usually write plaintext messages.

Reproducible: Always

Steps to Reproduce:




(Categorised as "critical" because it matches the description "lose data".)

Comment 1

13 years ago
I'm unable to reproduce this: 1.5.0.2-0324, Win2K.

Updated

13 years ago
Severity: critical → major
(Reporter)

Comment 2

13 years ago
I just tried it out: I went to the e-mail I sent out yesterday (it was sent out fine after all), opened it as a new mail and boom, there was that yellow page background again. Closing Tb, re-opening it without extensions, the same thing happens, so it doesn't seem to interfer with my extensions (Talkback, MessageID Finder, Enigmail, Enigmail-DE, Unselect Message, MailRedirect, AccountEx, Quote Colors, Contacts Sidebar, Menu Editor). The e-mail's source code looks alright, it has a white page background set and an inline reference to the image. Only the message editor cannot handle its own message anymore. I could send you the message, if that helps.

I also tried to create a short new e-mail now, and it works alright with that one. Seems to be something more complicated that is related to the message itself.

Comment 3

13 years ago
(In reply to comment #2)
> I went to the e-mail I sent out yesterday (it was sent out
> fine after all), 

Meaning when you view it in the Sent folder, it looks OK?


> The e-mail's source code looks alright,
> it has a white page background set and an inline reference to the image. Only
> the message editor cannot handle its own message anymore. I could send you the
> message, if that helps.

That might help.  Save it (from the Drafts folder) as a .EML file and attach it to this bug, or forward it to me as an attachment if it has content you'd 
rather not make public.


> I also tried to create a short new e-mail now, and it works alright with that
> one. Seems to be something more complicated that is related to the message
> itself.

Did you do this under Safe Mode, or a normal startup?
(Reporter)

Comment 4

13 years ago
I now checked if this also happens with other e-mails, and it does. I can "open as new" any HTML e-mail from that folder. If it has a background image, it is not displayed in the message editor, but the background is a solid colour. If it has a solid colour background, the previous solid colour shows up for a very short time and is then replaced by the correct colour from the mail. When I then open a message with an image again, the image is not displayed, but is replaced by the solid colour that was last used. (First, it was plain yellow, after opening a message with a light yellow background, all messages had that light yellow background, too.)

> Meaning when you view it in the Sent folder, it looks OK?

Yes.

> Did you do this under Safe Mode, or a normal startup?

In both. And it worked in both with a new message. But it doesn't work in any with the existing messages.

I'm sending you one of the messages that don't work.

Comment 5

13 years ago
Reporter provided me with three sample messages.

1) <body bgcolor="#ffffcc" [...]>  (no bg image, light yellow; gen'd by TB)
2) <BODY background=cid:blahblah>  (no bgcolor; gen'd by Outlook Express)
   also has a <style> tag with:  COLOR: #ff6633;  and some margin and font
   styles.
3) <body background="cid:blahblah" bgcolor="#ffffff" [...]> (gen'd by TB)

All three messages have a text and an HTML part, and each of these parts has a Content-Transfer-Encoding of quoted-printable.

(In reply to comment #4)
> I can "open as new" any HTML e-mail from that folder. If it has a background
> image, it is not displayed in the message editor, but the background is a
> solid colour.

Yes, I see this happen with messages #2 and #3.  The two cases are 
significantly different, however.

Edit As New on message #2: with TB 1.5, always assumes the most recent background color, but with 3.0a1, always follows HTML compose prefs.  (The difference in behavior is from the fix for bug 261187.)  Original text color 
is preserved.
If I then check the settings in Format Background and Colors, I see that the background image is *not set* and the background color is set to match the 
color that is used.  In other words, the image has been dropped, but otherwise it's behaving as expected.


Edit As New on message #3: With TB 1.5, initial background color as for #2, 
then switches to bright yellow after a short period.  With 2.0a1, immediately displays with the bright yellow.  With 3.0a1, immediately displays with a neutral color (my default plain-text background color) then switches to bright yellow.
If I then check the settings in Format Background and Colors, I see that the background image is shown as:
  ailbox:///<path>/331711?number#824&part=1.1.2&filename=<background>.jpg"
  ^ missing 'm'                 ^ not # but a bogus 0x18 character
and the background color is set to #ffff00.

This particular problem looks like a variation on bug 307023.  The message in question has exactly the same MIME structure as the sample message at that bug 
-- see bug 307023 comment 8 -- (except that the image here is a JPEG rather 
than a GIF):
 Top: Content-Type: Multipart/Alternative
   Part 1: Content-Type: text/plain; C-T-E: quoted-printable
   Part 2: Content-Type: multipart/related
     Part 2.1:  Content-Type: text/html; C-T-E: quoted-printable
     Part 2.2:  Content-Type: image/jpeg; C-T-E: base64

I suspect the yellow is due to a similar munging of the 'bgcolor' attribute, somehow converting the "#ffffff" to "#ffff00" -- but since you can't view the <body> tag in the source of the composition-in-progress, I can't say exactly 
how this has occurred.  (Also, the smileys in the message have been reduced to the plain-text equivalent, as the smileys' 'class' attribute is munged.)

Further, such a message cannot be saved as a draft -- an error is shown because the 'ailbox' URL cannot be resolved properly.


I'm not sure how or even if the behavior with message #2 is related, beyond the apparently symptom of no background image.  The MIME structure of that message is different, more like the 3rd example at bug 307023 comment 8 where the corruption was not occurring.

Comment 6

13 years ago
(In reply to comment #5)
> I suspect the yellow is due to a similar munging of the 'bgcolor' attribute,
> somehow converting the "#ffffff" to "#ffff00"

Further testing on this:
 #ffffff => #ffff00
 #fedcba => #fecb00
 #abcdef => #abde00

Weird.

Comment 7

13 years ago
(In reply to comment #5)
> I'm not sure how or even if the behavior with message #2 is related, beyond
> the apparently symptom of no background image.  The MIME structure of that
> message is different, more like the 3rd example at bug 307023 comment 8 where
> the corruption was not occurring.

OK, I've discovered the cause of this.  The background image is not copied from this particular message because:  the <BODY> tag is specified in uppercase.  If I tweak the message to use <body> instead, the background is copied over with 
no problem.  And apparently, none of the <body> attributes are copied over, in this case.  I've opened bug 331894 for this problem.
(Reporter)

Comment 8

13 years ago
I just tried to compose a new e-mail that I wanted to send out tomorrow. Still the same Thunderbird 1.5, an HTML message, no special page background or colour settings, no special font settings. A right-aligned photo (JPEG file I made myself, with custom CSS "margin-left: 30px;") and one graphical emoticon though. I saved the message, closed it, then re-opened it from my drafts: The background is plain yellow, the photo is gone (in the editor, it has a source location of: src=map://<myUser>@<myDomain>:993/fetch%3EUID%3E%5EDrafts%3E246?part=1.2&filename=Imgp2754-klein.jpg") and the emoticon is plaintext, too. So it doesn't limit on page backgrounds. The message editor just seems to be incapable of restoring HTML mails in general. The message view in the folder is still fine, just as I saved it.

There's no trick in creating such a message, just start a new HTML message, add a photo file and some text, save it, close it, open it again and see the difference.

I don't have much time today, but I'll try and setup a brand new Thunderbird installation in my VM PC and see if it also happens there. If it does, it really is a major bug!

Comment 9

13 years ago
(In reply to comment #8)
> I saved the message, closed it, then re-opened it from my drafts: The
> background is plain yellow, the photo is gone (in the editor, it has a source
> location of:
> src=map://<myUser>@<myDomain>:993/fetch%3EUID%3E%5EDrafts%3E246? [...]
      ^--  should be "imap:"
> and the emoticon is plaintext, too. So it doesn't limit on page backgrounds.
> The message editor just seems to be incapable of restoring HTML mails in
> general. The message view in the folder is still fine, just as I saved it.


> I don't have much time today, but I'll try and setup a brand new Thunderbird
> installation in my VM PC and see if it also happens there. If it does, it
> really is a major bug!

You don't need to -- as I said, the problems being seen here are a variation on bug 307023.  One thing you might try to prevent this:  Look under  
  Tools | Options | Composition
   [] For messages that contain 8-bit characters...

If that option is checked, uncheck it.  This should keep the message from being encoded with quoted-printable, which is the actual source of the problems here.

I'm going to dupe this bug to that one, and update that one to reflect this new information.  I don't know when we might see a fix for this, but the developers are aware of the problem.


btw: bug 331894 (see comment 7) has been fixed.  That won't address the 
messages composed by Thunderbird, but it does fix the minor problem you encountered of losing the background image when editing-as-new a message from your friend (from Outlook).

*** This bug has been marked as a duplicate of 307023 ***
Status: UNCONFIRMED → RESOLVED
Last Resolved: 13 years ago
Resolution: --- → DUPLICATE
(Reporter)

Comment 10

13 years ago
Thanks a lot, that option seems to do it for me.

Comment 11

12 years ago
*** Bug 331712 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.