First Last Prev Next    No search results available
Details
: default forward quote can't be completely hidden
Bug#: 25089
: smarttemplate4
: General
Status: RESOLVED
Resolution: FIXED
: PC
: Windows 7
: unspecified
: P2
: normal
: ---

:
:
:
:
:
  Show dependency tree - Show dependency graph
People
Reporter: Fishever@web.de
Assigned To: Axel Grude <axel.grude@gmail.com>
:

Attachments
screenshot (23.99 KB, image/jpeg)
2012-08-18 11:56, Fishever@web.de
no flags Details
Latest Prerelease 0.9.2 prerelease 53 (246.90 KB, application/x-xpinstall)
2012-09-05 01:08, Axel Grude
no flags Details
0.9.2 pre 54 (250.42 KB, application/x-xpinstall)
2012-09-05 11:01, Axel Grude
no flags Details
0.9.2 prerelease 85 (284.80 KB, application/x-xpinstall)
2012-10-26 01:55, Axel Grude
no flags Details
st4 0.9.5 prerelase 31 (335.50 KB, application/x-xpinstall)
2014-07-25 01:59, Axel Grude
no flags Details
0.9.6.1 prerelease 4 (336.77 KB, application/x-xpinstall)
2014-10-21 02:20, Axel Grude
no flags Details
0.9.7 prerelease 97 (340.14 KB, application/x-xpinstall)
2015-04-15 03:59, 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-08-18 05:52
Reply quote works fine, but the forward quote can't be hidden completely, you
can still see "------original message------" behinde your own made quote. error
console shows mainly two types of warning: 1. Unknown property
'mso-style-priority'. Declaration dropped. 2. unknown character panose-1 in
rule @font-face.
------- Comment #1 From Axel Grude 2012-08-18 11:38:15 -------
Are you using plain text mode? The 2 errors you are seeing are caused by
content (contents of an email, possibly written with outlook) and are not
relevant in this specific case. For better error console output and the ability
to copy all error output as text, please install console2.
------- Comment #2 From Fishever@web.de 2012-08-18 11:56:01 -------
Created an attachment (id=7336) [details]
screenshot
------- Comment #3 From Fishever@web.de 2012-08-18 11:58:42 -------
thanks a lot for the willing to help, but I'm really not that kind of expert
with thunderbird.......but still did what you asked me to do, downloaded
console2 and write myself a clean simple mail online (html), then click forward
button, and nothing shows up in the error console, and BTW, I'm using a chinese
version thunderbird so even I can copy paste you the warnings, they're all in
chinese......sorry dude......
I made a screenshot, the chinese words in the picture means orignal message,
which is the thing I would like to hide and I believe it's a part of the
default quote. I don't know if this is just happening to me or because of the
language version, the last version of the addon works fine, so hope this could
help. 
------- Comment #4 From Axel Grude 2012-08-18 12:40:59 -------
(In reply to comment #3)
> thanks a lot for the willing to help, but I'm really not that kind of expert
> with thunderbird.......but still did what you asked me to do, downloaded
> console2 and write myself a clean simple mail online (html), then click forward
> button, and nothing shows up in the error console, 

now that you have console2 installed, click on All (top left button) and then
under Options, activate "Report strict warning" and "Report all JS Exceptions"

> and BTW, I'm using a chinese
> version thunderbird so even I can copy paste you the warnings, they're all in
> chinese......sorry dude......
ok, but file names and line numbers should still be in English. :)

> I made a screenshot, the chinese words in the picture means original message,
> which is the thing I would like to hide and I believe it's a part of the
> default quote. 

Yes, we match that against the language resource that it comes from. I wonder
whether the match doesn't work because of a string format problem caused by
Chinese characters... will have to test that with Chinese locale... comparing
strings with eastern languages can sometimes be problematic.

> I don't know if this is just happening to me or because of the
> language version, the last version of the addon works fine, so hope this could
> help. 
the last version does the same kind of matching for finding the quote header.
Have you checked the option [x] "Disable default THunderbird quote header" at
the bottom of the smartTemplate4 settings for Forwarding?


------- Comment #5 From Axel Grude 2012-08-18 13:24:17 -------
(In reply to comment #4)
> (In reply to comment #3)
 "Report strict warning" and "Report all JS Exceptions"
> 
> > and BTW, I'm using a chinese
> > version thunderbird so even I can copy paste you the warnings, they're all in
> > chinese......sorry dude......
> ok, but file names and line numbers should still be in English. :)
> 

Ok I have tried this with simplified Chinese (zh-CN) but couldn't reproduce it.
Which Chinese locale are you using? And which version of Thunderbird?

Axel
------- Comment #6 From seambeat@gmail.com 2012-09-05 00:12:30 -------
Hi,

I experience the same problem. When I forward a message, SmartTemplate4 inserts
its header but doesn't remove the original one. It seams to swallow first two
lines of the original, but while they are empty I'm not sure about it. 

Note 1: In preferences, the check box "Disable default Thunderbird quote
header" is checked. 

Note 2: The Error Console is empty (cleared before forward, empty after it)

Note 3: Reply header works fine.

The message being forwarded looks like this:

-----------------------------------------------------------------------------


----- Original Message -----
From: bugzilla-daemon@mozdev.mozdev.org
To: seambeat@gmail.com
Sent:  Wed Sep 05 2012 08:37:39 GMT+0200
Subject: Bugzilla@Mozdev: confirm account creation-------- Original Message
--------
Subject: Bugzilla@Mozdev: confirm account creation
Date: Tue,  4 Sep 2012 23:37:39 -0700 (PDT)
From: bugzilla-daemon@mozdev.mozdev.org
To: seambeat@gmail.com

<message body>
-----------------------------------------------------------------------------

The first 2 empty lines belong to the header I defined in SmartTemplate4. They
are OK. Then comes the actual (non empty) content of the template (5 lines) -
OK. The original Thunderbird header is appended right behind the
SmartTemplates4's one without newline - this is the bug, the original header
should be removed.

I'm on Linux/Ubuntu 12.04/Gnome 3 having Thunderbird 15.0 with SmartTemplate4
0.9.1.

PS: SmartTemplate4 is great. Found it recently, I like the possibility to
define the header completely by my self.
------- Comment #7 From Axel Grude 2012-09-05 01:08:51 -------
Created an attachment (id=7381) [details]
Latest Prerelease 0.9.2 prerelease 53

Please use the latest version to check whether it is gone. Note that you have
to move the "quote header" part that you are referring to, to the new textbox
at the top. 

The bottom text box is for the salutation and other parts of the reply message
body.
------- Comment #8 From seambeat@gmail.com 2012-09-05 04:47:59 -------
(In reply to comment #7)
> Created an attachment (id=7381) [details] [details]
> Latest Prerelease 0.9.2 prerelease 53
> 
> Please use the latest version to check whether it is gone. Note that you have
> to move the "quote header" part that you are referring to, to the new textbox
> at the top. 
> 
> The bottom text box is for the salutation and other parts of the reply message
> body.
> 

It works as expected. Both reply and forward are OK. Thanks. :)

There is just one more inconvenience. My templates for both reply and forward
are the same:

2 empty lines (just to have a place I can type to)
5 lines with header data (separator, From, To, Sent, Subject)
1 empty line (to separate the header from the original message body)

When I do reply, I get the reply message with the cursor on the first line at
position (about) 80, i.e. at the end of the line which is actually empty (no
spaces, just newline). I need to hit a key or click to the window, to get the
cursor to the beginning of the line, where it should be. It is not an issue
since I still need to hit a key to write the reply, but it looks strange.

The forward is OK, the focus is in the "To" address row so I can type the
address I want to forward to.

This is probably a TB/GTK thing but maybe you can "workabout it".
------- Comment #9 From Axel Grude 2012-09-05 07:09:01 -------
*** Bug 25126 has been marked as a duplicate of this bug. ***
------- Comment #10 From Fishever@web.de 2012-09-05 09:43:38 -------
Hi there. I'm the reporter of this bug. Have tried the latest version been
posted (pre53), pity it didn't work for me. I can't reach the setting option,
it said error of XML analising at position:
chrome://smarttemplate4/content/settings.xul
Think I met this before and that time I asked for your help, too. By sending me
another version solved this problem. Maybe it's the language thing.
------- Comment #11 From Axel Grude 2012-09-05 10:07:45 -------
(In reply to comment #10)
> Hi there. I'm the reporter of this bug. Have tried the latest version been
> posted (pre53), pity it didn't work for me. I can't reach the setting option,
> it said error of XML analising at position:
> chrome://smarttemplate4/content/settings.xul
> Think I met this before and that time I asked for your help, too. By sending me
> another version solved this problem. Maybe it's the language thing.
> 
Which line, and which language?
------- Comment #12 From Fishever@web.de 2012-09-05 10:24:54 -------
I'm using thunderbird 15.0 on windows 7 32bit, simplified chinese (zh-Cn)
Error is at row 180, column 12.
------- Comment #13 From Axel Grude 2012-09-05 11:01:40 -------
Created an attachment (id=7382) [details]
0.9.2 pre 54

This one includes the missing simplified chinese Strings, fresh from our
translator
------- Comment #14 From Fishever@web.de 2012-09-05 13:30:33 -------
Thanks for the new version. It works now. But my old problem is still there
(like the screenshot I uploaded), forward mode works still not completely fine
with me. So now maybe we can say this is because of some other extensions I've
used but not a bug of ST4. Anyway, still thanks a lot for the help.
------- Comment #15 From Axel Grude 2012-09-06 05:47:43 -------
*** Bug 25127 has been marked as a duplicate of this bug. ***
------- Comment #16 From PeterM 2012-10-01 04:15:11 -------
0.9.2pre54
Thank you for your effort. I can confirm the original problem still exists. But
I think I've found a reason.
I'm using Slovakian (sk-SK) TB 15.0.1. When forwarding, the original quote
appears under the one from SmartTemplate.

It seems that forward delimiter text is no longer taken from resource 1041 but
(surprisingly) from mailnews.reply_header_originalmessage. See
https://bugzilla.mozilla.org/show_bug.cgi?id=776438

In my case, resource 1041 returns:
---- Pôvodná správa ----
but mailnews.reply_header_originalmessage returns:
-------- Pôvodná správa --- Original Message --------

They are not the same so the quote deletion fails.

Now the technical solution.
ST4 uses bndl.GetStringFromID(1041) in delForwardHeader function. For newer
versions of TB it should probably read from
mailnews.reply_header_originalmessage

When I placed the following line:
origMsgDelimiter =
Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch).getComplexValue("mailnews.reply_header_originalmessage",
Components.interfaces.nsIPrefLocalizedString).data;

after line:
let origMsgDelimiter = bndl.GetStringFromID(1041);

then everything worked fine. Note, I didn't use:
origMsgDelimiter =
SmartTemplate4.pref.getCom("mailnews.reply_header_originalmessage",
origMsgDelimiter);

It's because my mailnews.reply_header_originalmessage is not explicitly
redefined and it uses default value. It such a case, getCom returns
chrome://messenger/locale/messengercompose/composeMsgs.properties

To correctly resolve localized string, the nsIPrefLocalizedString should be
used instead of nsISupportsString in getCom function. See
https://developer.mozilla.org/en-US/docs/Code_snippets/Preferences
I thing the getCom should be modified with nsIPrefLocalizedString to avoid
similar problems in other parts of code.

Hope this helps to fix the problem.
------- Comment #17 From Axel Grude 2012-10-26 00:21:20 -------
(In reply to comment #16)
> 0.9.2pre54
> Thank you for your effort. I can confirm the original problem still exists. But
> I think I've found a reason.
> I'm using Slovakian (sk-SK) TB 15.0.1. When forwarding, the original quote
> appears under the one from SmartTemplate.
> 
> It seems that forward delimiter text is no longer taken from resource 1041 but
> (surprisingly) from mailnews.reply_header_originalmessage. See
> https://bugzilla.mozilla.org/show_bug.cgi?id=776438

> It's because my mailnews.reply_header_originalmessage is not explicitly
> redefined and it uses default value. It such a case, getCom returns
> chrome://messenger/locale/messengercompose/composeMsgs.properties
> 
> To correctly resolve localized string, the nsIPrefLocalizedString should be
> used instead of nsISupportsString in getCom function. See
> https://developer.mozilla.org/en-US/docs/Code_snippets/Preferences
> I thing the getCom should be modified with nsIPrefLocalizedString to avoid
> similar problems in other parts of code.
> 
> Hope this helps to fix the problem.
> 

Wow that's been pretty detailed, thanks. I will look into this, need to digest
it first :)

When you said "newer version" do you have any idea from which version number
onwards this applies?
------- Comment #18 From PeterM 2012-10-26 00:36:49 -------
(In reply to comment #17)
> When you said "newer version" do you have any idea from which version number
> onwards this applies?

According to https://bugzilla.mozilla.org/show_bug.cgi?id=776438 this started
in TB 14.
------- Comment #19 From Axel Grude 2012-10-26 01:55:53 -------
Created an attachment (id=7399) [details]
0.9.2 prerelease 85

Attempt to fix this is by using mailnews.reply_header_originalmessage according
to Thunderbird [Bug 776438] 
------- Comment #20 From Fishever@web.de 2012-10-26 02:10:06 -------
(In reply to comment #19)
> Created an attachment (id=7399) [details] [details]
> 0.9.2 prerelease 85
> 
> Attempt to fix this is by using mailnews.reply_header_originalmessage according
> to Thunderbird [Bug 776438] 
> 

Thanks a lot for the effort. This version now works perfect with me. So I think
bug fixed.
------- Comment #21 From PeterM 2012-10-26 02:12:12 -------
(In reply to comment #19)
> Created an attachment (id=7399) [details] [details]
> 0.9.2 prerelease 85

Yes, this version works fine. Thank you.
------- Comment #22 From Axel Grude 2014-07-24 12:42:02 -------
Reopening this bug, apparently we have the same problem in Thunderbird 31.0 -
when forwarding emails the original quote header is not removed anymore.
------- Comment #23 From Axel Grude 2014-07-25 01:59:05 -------
Created an attachment (id=7899) [details]
st4 0.9.5 prerelase 31

This fixes the problem on Thunderbird 31.0. Apparently there is a new
forwarding header "---- Forwarwded Message ---- " which is different from the
reply header "----- Original Message -----"

See
http://mxr.mozilla.org/comm-central/source/suite/locales/en-US/chrome/mailnews/compose/composeMsgs.properties#285


mailnews.reply_header_originalmessage=-------- Original Message --------
mailnews.forward_header_originalmessage=-------- Forwarded Message --------
------- Comment #24 From Axel Grude 2014-10-21 02:20:48 -------
Created an attachment (id=7946) [details]
0.9.6.1 prerelease 4

Additional version for users of older versions of Thunderbird (Tb 24). This
used to throw an error when looking for the "forward" header. 
------- Comment #25 From Axel Grude 2015-04-15 03:59:45 -------
Created an attachment (id=8040) [details]
0.9.7 prerelease 97

I was still able to reproduce the bug in Postbox with plain text mode. It seems
ST4 was a little to conservative in deleting plain text nodes so I remedied
this.

There is a config new setting 

extensions.smartTemplate4.plainText.preserveTextNodes

which is now defaulted to "false". Set to "true" for getting the old behavior
back if it deletes "too much".

First Last Prev Next    No search results available