First Last Prev Next    No search results available
Details
: Message body not included replying to "plain-text" messages
Bug#: 24988
: smarttemplate4
: General
Status: RESOLVED
Resolution: FIXED
: PC
: Windows 7
: unspecified
: P2
: major
: ---

:
:
:
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Michael Rothaus <MRothaus@Yahoo.com>
Assigned To: Axel Grude <axel.grude@gmail.com>

Attachments
Screen shots of various TBird settings (211.50 KB, application/msword)
2012-06-29 15:49, Michael Rothaus
no flags Details
Latest Prerelease 0.9 - 123 (194.08 KB, application/x-xpinstall)
2012-07-02 14:10, Axel Grude
no flags Details
Error console contents during "Reply" to plain-text messaeg (45.29 KB, text/plain)
2012-07-03 08:03, Michael Rothaus
no flags Details
0.9 Prerelease 250 (230.13 KB, application/x-xpinstall)
2012-07-09 13:26, Axel Grude
no flags Details
test version - no permanent fix (230.32 KB, application/x-xpinstall)
2012-07-10 13:42, Axel Grude
no flags Details
Test Prerelease 0.9 - 256 (230.32 KB, application/x-xpinstall)
2012-07-10 17:02, Axel Grude
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.

Related actions


Description:   Opened: 2012-06-29 15:49
Created an attachment (id=7295) [details]
Screen shots of various TBird settings

In SmartTemplate4 0.8.5.6, in Thunderbird 13.0.1, with "Reply" set as follows:

"HTML" -> unchecked
"use instead of default quote header" -> checked

Reply template:
   --------------Original Message--------------
   Subject: %subject%
   Date: %date%
   From: %from%
   To: %to%{
   CC: %cc%}

When replying to a "plain-text" message, the SmartTemplate4 reply header is
inserted, but the message body is not.  When replying to an "HTML" formatted
message, both the reply header and message body are inserted (expected
behavior).
------- Comment #1 From Axel Grude 2012-06-30 09:37:26 -------
thanks for the info, expect a patch shortly. 
------- Comment #2 From Axel Grude 2012-07-01 04:14:23 -------
Interestingly, the screenshots show that you have checked the option

[x] Include signature for replies,

yet there is no signature defined (neither in the text field nor as an attached
file)

- does it make a difference if you uncheck that box?
------- Comment #3 From Michael Rothaus 2012-07-01 05:08:34 -------
It does not make a difference if I have the "Include signature for replies".  I
tried both ways (checked and unchecked) while testing for you since you
mentioned that you did a lot of work with signatures.

(In reply to comment #2)
> Interestingly, the screenshots show that you have checked the option
> 
> [x] Include signature for replies,
> 
> yet there is no signature defined (neither in the text field nor as an attached
> file)
> 
> - does it make a difference if you uncheck that box?
> 
------- Comment #4 From Axel Grude 2012-07-02 14:10:43 -------
Created an attachment (id=7297) [details]
Latest Prerelease 0.9 - 123

I amn trying really hard to reproduce this on my Thunderbird 3.0.1, replicated
all your settings but I cannot make it fail. Could you please install the
attached prerelease and then activate debug mode (checkbox) and the settings 
extensions.smartTemplate4.debug.deleteNodes
extensions.smartTemplate4.debug.functions
extensions.smartTemplate4.debug.functions.delReplyHeader
extensions.smartTemplate4.debug.functions.insertTemplate
extensions.smartTemplate4.debug.mime
extensions.smartTemplate4.debug.regularize

(you get to these by right-clicking the debug checkbox)

then open tools / (javascript) error console, delete the output and try the
reply - are you getting warnings / messages?
------- Comment #5 From Michael Rothaus 2012-07-03 03:52:42 -------
I installed 0.9 - 123 (into TBird 13.0.1)

I disabled all other plug-ins.

I activated the debug options you requested (right-clicking on "Debug" worked
like you said).

I cleared the error console.

I replied to a plain-text message.

The message body flashed for an instant and then disappeared.

I reviewed the error console, but there were no warnings and no errors.  Just
informational messages.  There doesn't seem to be an easy way to copy the
entire console, so I didn't attach it to this bug report.

We may have to wait to see if anybody else reports the same problem.  My
work-around is to uncheck the "Use instead of default quote header", and then
delete the extra line that starts with "on <date time>, <sender> wrote:" in the
message body.  I can live with that.

I may also attempt a fully fresh install of TBird on another machine and if the
bug disappears, I'll have to compare the config settings.
------- Comment #6 From Axel Grude 2012-07-03 06:32:42 -------
(In reply to comment #5)
Thanks Michael for the detail so far!

> 
> I reviewed the error console, but there were no warnings and no errors.  Just
> informational messages. 

Even these are of interest. See below for an easy way of harvesting them.

> There doesn't seem to be an easy way to copy the
> entire console, so I didn't attach it to this bug report.

It is actually very easy with the console2 extension which supports the
clipboard.

Instructions:

Install console2 (a easier and better version of Thunderbird's built in error
console)
https://addons.mozilla.org/en-US/thunderbird/addon/console%C2%B2/

Then make sure you have debug mode checked in ST4 and open the advanced debug
settings by right-clicking the debug box; and activate the following debug
settings:
extensions.smartTemplate4.debug.deleteNodes
extensions.smartTemplate4.debug.functions
extensions.smartTemplate4.debug.functions.delReplyHeader
extensions.smartTemplate4.debug.functions.insertTemplate
extensions.smartTemplate4.debug.mime
extensions.smartTemplate4.debug.regularize

this means there will be a lot more communication happening in the error
console and hopefully a pointer as to where and how the problem happens.

Next, please open tools > error console and activate all errors (push top left
button); then deactivate only CSS and resource.

In options, activate: "report strict warnings" and "report all JS exceptions".

Then, delete all the output (top right button) and attempt another reply.

After log has been created, click the log window.

Highlight all output (CTRL+A should do the trick) and Copy it (CTRL+C) to the
clipboard, paste it in a plain text file and attach it to the bug.
------- Comment #7 From Michael Rothaus 2012-07-03 08:03:06 -------
Created an attachment (id=7298) [details]
Error console contents during "Reply" to plain-text messaeg

Console2 worked as advertised. I attached the error console contents you
requested.
------- Comment #8 From Axel Grude 2012-07-09 13:26:16 -------
Created an attachment (id=7307) [details]
0.9 Prerelease 250

Here is an attempt at a patch. I have tested this with Thunderbird 3.1.20
(which is the latest of the 3.x branch) both in html and plain text mode. 

hopefully it will work for you as well..

note: only German and English locale are currently supported.
------- Comment #9 From Michael Rothaus 2012-07-09 14:24:39 -------
Installed Prerelease 250, but unfortunately the plain-text message body still
disappears (after a brief flash).

I may have time in the next week or two to do a complete fresh install of
TBird...as I suspect it is something in my config that is causing the problem
(different than the default settings).
------- Comment #10 From Axel Grude 2012-07-10 13:40:28 -------
(In reply to comment #7)
> Created an attachment (id=7298) [details] [details]
> Error console contents during "Reply" to plain-text messaeg
> 
> Console2 worked as advertised. I attached the error console contents you
> requested.
> 

I have analyzed your console output, and the big difference I see against my
own test cases is after it encounters the "moz-cite-prefix"

SmartTemplate4 {DELETENODES} 10:54:37.473  [0 ms]        
deleteNodeTextOrBR() - deletes node div class matched: moz-cite-prefix  div
_________DIV_________
innerHTML: On 2012.06.25 12:51, Aaron DeBerry wrote:<br>

from then onwards you appear to have a constant pattern of pairs of:
<BR> node followed by #text nodes.

In your case, the #text nodes contain all the contents of the original Email
(the Email you are replying to). In my case, appears to be contained in a
<span> element.
(In reply to comment #7)
> Created an attachment (id=7298) [details] [details]
> Error console contents during "Reply" to plain-text messaeg
> 
> Console2 worked as advertised. I attached the error console contents you
> requested.
> 
------- Comment #11 From Axel Grude 2012-07-10 13:42:31 -------
Created an attachment (id=7309) [details]
test version - no permanent fix

this is just a test version that avoids deleting #text nodes when not in HTML
mode, but I cannot currently promise you that this is the final way of trying
to fix this as I am afraid that it might introduce side effects on other
system. 

Please try it anyway to see whether it addresses this issue for you.
------- Comment #12 From Michael Rothaus 2012-07-10 16:35:35 -------
You are getting closer to a fix!!  I really appreciate the effort you are
putting into solving this.

The message body is no longer deleted, but it is formatted funny.  It looks
like carriage-returns are being substituted with ">".

The reply now looks like this:

--------------Original Message--------------
Subject: RE: GenProductID, SynonymID and SynonymTypeID question
Date: Mon, 25 Jun 2012 12:51:46 -0400 (EDT)
From: Aaron DeBerry <aaron.deberry@lexi.com>
To: 'Michael Rothaus' <MRothaus@Argentek.com>
CC: 'Integration Support' <integration.support@lexi.com>> > Good afternoon
Michael,> > I apologize for the long delay in getting back to you on this.> > >
We have been able to duplicate this issue, and we are working on a fix.> >
Currently, I am anticipating an updated .NET dll that should correct this> to
be available in our July release, but I will have more information> available
for you when we are closer to our release date (which is> scheduled for July
13th).> > > > > Thank you.> >
------- Comment #13 From Axel Grude 2012-07-10 17:02:45 -------
Created an attachment (id=7310) [details]
Test Prerelease 0.9 - 256

ok this is another version, pursuing the same direction. It invalidates the
other attachments. This version doesn't delete #text NOR <br> nodes during the
"moz-cite" stage, (only) while in plain-text mode. Of course this still needs
to be tested rigorously against the various variatoons in configuring the Mail
account, including with/without signature, HTML, HTML template & plain text
template etc. etc.

One Problem I am currently seeing is that it appears to still actually strip
off the signature of the original email (which is not by design), so plain-text
is still somewhat volatile. It is also harder as there is less information in
the composed email in order to determine what each part is... looking forward
tp your test results.
------- Comment #14 From Michael Rothaus 2012-07-10 17:16:19 -------
(In reply to comment #13)
> Created an attachment (id=7310) [details] [details]
> Test Prerelease 0.9 - 256

It is now fixed!  But as you said...now you have to test to see if it caused
problems on other variations.  Here is the same email reply I've been using,
you can see the big improvement:


--------------Original Message--------------
Subject: RE: GenProductID, SynonymID and SynonymTypeID question
Date: Mon, 25 Jun 2012 12:51:46 -0400 (EDT)
From: Aaron DeBerry <aaron.deberry@lexi.com>
To: 'Michael Rothaus' <MRothaus@Argentek.com>
CC: 'Integration Support' <integration.support@lexi.com>


Good afternoon Michael,

I apologize for the long delay in getting back to you on this.


We have been able to duplicate this issue, and we are working on a fix.

Currently, I am anticipating an updated .NET dll that should correct this
to be available in our July release, but I will have more information
available for you when we are closer to our release date (which is
scheduled for July 13th).
------- Comment #15 From Axel Grude 2012-07-10 17:44:11 -------
(In reply to comment #14)
> (In reply to comment #13)
> > Created an attachment (id=7310) [details] [details] [details]
> > Test Prerelease 0.9 - 256
> 
> It is now fixed!  But as you said...now you have to test to see if it caused
> problems on other variations.  Here is the same email reply I've been using,
> you can see the big improvement:
>

Good news. Funny I would have expected the quoted lines to start with ">" as
the indication from comman #12 seemed to be that the <br> tags only had been
removed. But I guess this result is good enough for plain text. I will leave
the bug open for a while, until we have done more extensive testing.
------- Comment #16 From Michael Rothaus 2012-07-10 19:53:49 -------
> Good news. Funny I would have expected the quoted lines to start with ">" as
> the indication from comman #12 seemed to be that the <br> tags only had been
> removed.

The ">" are removed by another extension I have called "ReFwdFormatter 0.3.1".

With your template, there is no need to quote the message body and take up
needless space as it is obvious that the message body is part of the reply.

If you want to supply an option in SmartTemplate with a checkbox "Remove prefix
from quoted lines", I'd be happy to eliminate the extension and let
SmartTemplate do the job :))
------- Comment #17 From Axel Grude 2012-07-11 01:43:22 -------
(In reply to comment #16)

> The ">" are removed by another extension I have called "ReFwdFormatter 0.3.1".
> 
> With your template, there is no need to quote the message body and take up
> needless space as it is obvious that the message body is part of the reply.
> 
> If you want to supply an option in SmartTemplate with a checkbox "Remove prefix
> from quoted lines", I'd be happy to eliminate the extension and let
> SmartTemplate do the job :))
> 
Not to sure yet, although I guess it would be possible; it is always hard to
decide how far to take the functionality, obviously that whole quoting /
unquoting formatting could be taken quite far by an extension that already does
some processing during composition startup and has to parse the whole Email
anyway.

At the end of the day it is more a question about whether it fits into the core
functionality (smart templates = mainly about recomposing headers)

If you like, raise a fresh bug on this and we can discuss it further.
------- Comment #18 From Michael Rothaus 2012-07-11 04:01:05 -------
> At the end of the day it is more a question about whether it fits into the core
> functionality (smart templates = mainly about recomposing headers)
> 
> If you like, raise a fresh bug on this and we can discuss it further.

I think we can drop the topic...you are providing a "Smart Template"...so I'm
not convinced it is a core functionality either.

However, back to the bug on hand, I believe there is an extra carriage-return
between your template and the message body, which I cannot get rid of, and may
have been introduced with your recent fixes.  I made sure that there are no
carriage returns at the end of the template (there is a carriage return at the
beginning):

--->>template starts here<<----------------

--------------Original Message--------------
Subject: %subject%
Date: %date%
From: %from%
To: %to%[[
CC: %cc%]]--->>template ends here<<----------------

Now look at comment #14, and you will see there are 2 carriage returns after
the template and before the message body starts.  There should only be one.
------- Comment #19 From Axel Grude 2012-10-26 02:37:20 -------
Settings this to resolved - I believe it was already fixed in 0.9 so no need to
add it to release notes for next version (0.9.2). For extra (or missing) line
breaks please check the other bugs.

First Last Prev Next    No search results available