First Last Prev Next    No search results available
Details
: If no Signature is defined, %sig% is not removed
Bug#: 25526
: smarttemplate4
: General
Status: RESOLVED
Resolution: FIXED
: PC
: Windows NT
: unspecified
: P2
: normal
: ---

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

Attachments
0.9.4 Prerelease 19 (314.23 KB, application/x-xpinstall)
2013-08-07 01:40, Axel Grude
no flags Details
0.9.4 Prerelease 20 (314.18 KB, application/x-xpinstall)
2013-08-07 03:18, Axel Grude
no flags Details
Log file of the problem (11.56 KB, text/plain)
2013-08-07 03:39, Frederik Niedernolte
no flags Details
No signature shown (8.87 KB, text/plain)
2013-08-07 04:22, Frederik Niedernolte
no flags Details
0.9.4 Prerelease 21 (314.31 KB, application/x-xpinstall)
2013-08-07 05:01, Axel Grude
no flags Details
0.9.4 Prerelease 25 (314.59 KB, application/x-xpinstall)
2013-08-07 09:19, Axel Grude
no flags Details
0.9.4 Prerelease 26 (314.61 KB, application/x-xpinstall)
2013-08-07 12:32, 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: 2013-08-07 00:49
If no Signature is defined, the %sig% variable should be removed. Instead this
is inserted:

<sig class="st4-signature" removedashes="false">%sig%</sig>
------- Comment #1 From Frederik Niedernolte 2013-08-07 01:37:34 -------
Bug is also relevant for %sig(2)%
------- Comment #2 From Axel Grude 2013-08-07 01:40:06 -------
Created an attachment (id=7639) [details]
0.9.4 Prerelease 19

To note: I think the bug only manifests if you are using Stationery with a
%sig% in it.

To try this version, have Stationery support enabled and Stationery0.8
installed. Put the %sig% wherever you like; if there is no signature defined it
should now remove the variable.
------- Comment #3 From Frederik Niedernolte 2013-08-07 01:45:57 -------
Your uploaded version works as expected but when there is a signature specified
it won't be displayed. Instead only a %sig% is shown:

<sig class="st4-signature" removedashes="true">%sig(2)%</sig>
------- Comment #4 From Axel Grude 2013-08-07 02:54:36 -------
(In reply to comment #3)
> Your uploaded version works as expected but when there is a signature specified
> it won't be displayed. Instead only a %sig% is shown:
> 
> <sig class="st4-signature" removedashes="true">%sig(2)%</sig>
> 
nice catch - can you test with %sig% as well?
------- Comment #5 From Frederik Niedernolte 2013-08-07 03:13:02 -------
Yes, same problem.

But another strange thing:

I have mail account A without a signature and mail Account B with a signature
specified in the Thunderbird mail account settings.

Now when I compose a new mail from mail account A no %sig% is shown as it
should. If I go to the inbox folder of mail account B and compose a new mail
the %sig% problem occurs.
But if I compose a new mail started from the inbox of mail account A and then
switch inside of the composing window the mail account to B the signature will
be added as it should PLUS -- and the signature again.
Look at the source code:

<body smarttemplateinserted="true"><div id="smartTemplate4-template">
<title></title>
<p>
test<br>1st signature&nbsp;</div><br>
<br><div class="moz-signature">-- <br>
</div></body>

So this seems to be another or related bug.
------- Comment #6 From Axel Grude 2013-08-07 03:18:34 -------
Created an attachment (id=7640) [details]
0.9.4 Prerelease 20

Bugfix - removing %sig% should now also work with sig(2).
------- Comment #7 From Axel Grude 2013-08-07 03:22:51 -------
(In reply to comment #5)
> Yes, same problem.
> 
> But another strange thing:
> 
> Now when I compose a new mail from mail account A no %sig% is shown as it
> should. 

...

> So this seems to be another or related bug.

Please raise a separate bug, if I wanted to quash all problems with signatures
in the same bug, this could never ever be closed :)

Generally it is not a good idea to add related bugs (it is a different test
case). In this case, there are indeed different logical flows at work.

------- Comment #8 From Frederik Niedernolte 2013-08-07 03:39:09 -------
Created an attachment (id=7641) [details]
Log file of the problem

Even with the new version 20 it doesn't work.

I have opened another bug report for the other problem with bug #25527
------- Comment #9 From Axel Grude 2013-08-07 04:06:10 -------
(In reply to comment #8)
> Created an attachment (id=7641) [details] [details]
> Log file of the problem
> 
> Even with the new version 20 it doesn't work.
> 
> I have opened another bug report for the other problem with bug #25527
> 

I might have only tested the case %sig(2)% _with_ signature defined. Are you
saying it doesn remove if it is _not_ defined?
------- Comment #10 From Frederik Niedernolte 2013-08-07 04:22:45 -------
Created an attachment (id=7643) [details]
No signature shown

No, that works but it doesn't show the real signature when a signature is
specified even if it tried it in the error console first but it is not
displayed.
------- Comment #11 From Axel Grude 2013-08-07 05:00:28 -------
(In reply to comment #10)
> Created an attachment (id=7643) [details] [details]
> No signature shown
> 
> No, that works but it doesn't show the real signature when a signature is
> specified even if it tried it in the error console first but it is not
> displayed.
> 

Hmm, prerelease 20 worked for me. I put the signature in the Signature textbox
(Account Settings). What are your settings in Account settings?

[x] Use HTML

    Any signature text in the box?

[x] Attach the signature

    Any Filename here?

I have written another fix for dealing with %sig(2)% when it is _not_ defined,
uploading shortly.
------- Comment #12 From Axel Grude 2013-08-07 05:01:44 -------
Created an attachment (id=7644) [details]
0.9.4 Prerelease 21

Fixing problem of not removing %sig(2)% when signature is not defined.
------- Comment #13 From Axel Grude 2013-08-07 09:19:39 -------
Created an attachment (id=7645) [details]
0.9.4 Prerelease 25

Fixed the %sig% processing for the "New mail" case. Looks like a "big fat side
effect" which was based on an optional parameter backfired badly. Please test
relentlessly!

In this version I also added a (Stationery only) variable %quoteHeader% which
can be used to insert the contents of the [optional] quote header in the
Stationery Template. In the case of "write new" email this is of course simply
removed.
------- Comment #14 From Frederik Niedernolte 2013-08-07 12:18:00 -------
With prerelease 25 everything works except for strange and unnecessary <br> and
<pre> tags for the HTML signature (even if the option to replace line breaks
with <br> is deactivated and no <br> or <pre> tags are added to the HTML
signature).
Also "<div class="moz-cite-prefix">schrieb Axel Grude (Axel):<br></div>" isn't
necessary.
------- Comment #15 From Axel Grude 2013-08-07 12:32:31 -------
Created an attachment (id=7646) [details]
0.9.4 Prerelease 26

When called from a %quoteHeader% (and possibly also in other circumstances?)
the readSignature function made a bad attempt at guessing HTML format when
reading attached signature files. This would lead to extra <br> tags and some
unnecessary <pre> tags wrapping the signature.

This version fixes that.
------- Comment #16 From Axel Grude 2013-08-07 12:35:39 -------
(In reply to comment #14)

> Also "<div class="moz-cite-prefix">schrieb Axel Grude (Axel):<br></div>" isn't
> necessary.
> 

Methinks this observation belongs to [Bug 25528]. no bugspam, please :)
------- Comment #17 From Frederik Niedernolte 2013-08-09 05:17:10 -------
(In reply to comment #15)
> Created an attachment (id=7646) [details] [details]
> 0.9.4 Prerelease 26
> 
> When called from a %quoteHeader% (and possibly also in other circumstances?)
> the readSignature function made a bad attempt at guessing HTML format when
> reading attached signature files. This would lead to extra <br> tags and some
> unnecessary <pre> tags wrapping the signature.
> 
> This version fixes that.
> 

Bug fixed, everything works perfectly :)
Thanks!

First Last Prev Next    No search results available