Bug 184307 - Template suddenly become %BLANK - no quote text in replies
Summary: Template suddenly become %BLANK - no quote text in replies
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: templates (show other bugs)
Version: 1.11.0
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 188385 196237 202377 204809 209895 216309 237766 241261 241262 265569 267440 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-02-14 14:01 UTC by Joshua Dunamis
Modified: 2012-01-08 12:25 UTC (History)
29 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Dunamis 2009-02-14 14:01:49 UTC
Version:           1.11.0 (using 4.2.00 (KDE 4.2.0), Kubuntu packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.27-12-generic

It's very strange! Since a week ago it worked fine. After then I sented a message forwarded, now every time I try to replay a message it is completly blank, empty in the body of message without any quote of the message I'm tryng to reply. I hope I clearly explained the problem. I don't speak english very well. 

Anyway I tried everythings in the configuration options but nothing happens.
Comment 1 Jaime Torres 2009-02-14 14:06:43 UTC
Plase, look at the templates options in settings|config, in the folder the mails to reply are (folder properties) and in the identity properties.

Comment 2 Joshua Dunamis 2009-02-14 15:56:25 UTC
OK, thanks very much!
I went to Templates and found out %BLANK. Therefore I pressed Predefinited and the first line changed but problem was still there. Finally I removed manually the second line %BLANK and now it works fine. Strangly because I never changed anything in templates options. 

Anyway now it works fine. 
Comment 3 Thomas McGuire 2009-02-25 10:13:32 UTC
Yes, there's some mysterious bug somewhere that causes the templates to go blank, no idea why.
Comment 4 Thomas McGuire 2009-03-29 12:09:20 UTC
*** Bug 188385 has been marked as a duplicate of this bug. ***
Comment 5 Jonathan Marten 2009-04-10 18:24:20 UTC
SVN commit 951937 by marten:

Ensure that the default for "Use custom templates in this folder" is off.

Make the "Insert command" button in the templates dialogue into a proper
menu button, using QPushButton::setMenu().

Eliminate "No newline at end of file" warning for stringutil.h

CCBUG:184307


 M  +1 -1      stringutil.h  
 M  +1 -0      templatesconfiguration_kfg.kcfg  
 M  +4 -10     templatesinsertcommand.cpp  
 M  +0 -1      templatesinsertcommand.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=951937
Comment 6 Jonathan Marten 2009-04-10 18:39:10 UTC
The change to the .kcfg file in the previous commit should have fixed the problem where all folders acquired per-folder template settings.  Folder template settings are now respected.

With the above applied to current trunk, cannot reproduce the problem of all templates changing to %BLANK.  If this problem happens with the above applied and the "Use custom templates" folder option off, then check the template text in Configure KMail - Composer - Standard Templates.  If all of these are %BLANK, then the easiest way to revert to the defaults is to exit KMail and delete the [GlobalTemplates] section from ~/.kde/share/config/kmailrc.
Comment 7 Thomas McGuire 2009-04-14 10:10:43 UTC
SVN commit 953507 by tmcguire:

Backport r951937 by marten from trunk to the 4.2 branch:

Ensure that the default for "Use custom templates in this folder" is off.

Make the "Insert command" button in the templates dialogue into a proper
menu button, using QPushButton::setMenu().

Eliminate "No newline at end of file" warning for stringutil.h

CCBUG:184307



 M  +1 -0      templatesconfiguration_kfg.kcfg  
 M  +4 -10     templatesinsertcommand.cpp  
 M  +0 -1      templatesinsertcommand.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=953507
Comment 8 Thomas McGuire 2009-05-08 13:16:36 UTC
The problem that templates get %BLANK still happens, I just got a report on IRC about this, with KDE 4.2.3.
Comment 9 claydoh 2009-05-09 20:14:03 UTC
I just  had this bug happen to me, Kubuntu Jaunty KDE 4.2.3. One machine was fine , the other had this occur. Editing kmailrc did fix the problem
Comment 10 Thilo-Alexander Ginkel 2009-05-11 08:35:17 UTC
I also just spotted this problem under KDE 4.2.3. As far as I can see the configuration for the templates still seems to be in the file, but file corruption apparantly prevents kmail from reading the data (so %BLANK is taken as a default). When opening kmailrc with vim I can see some control characters (rendered as "@") in the MessageListView::Themes and MessageListView::Aggregations section.
Comment 11 Steven M. Parrish 2009-05-24 23:39:07 UTC
I can confirm that this is still happening on Fedora with KDE 4.2.3
Comment 12 Thomas McGuire 2009-06-12 21:52:03 UTC
*** Bug 196237 has been marked as a duplicate of this bug. ***
Comment 13 Russ Fineman 2009-06-13 07:49:44 UTC
(In reply to comment #12)
> *** Bug 196237 has been marked as a duplicate of this bug. ***

Thanks Thomas doing the procedure in comment #3 in kmail  --> settings -->
--> composer --> Standard Templates -->New Message and clicking the default button the % Blank changed in all 4 templates to what appears to be the correct configuration. Now clicking on forward in-line sets up correctly. 

be nice if we could find what caused it. I'm using openSuSE 11.1. KDE 4.2.4, also have 
a 11.2 milestone 2 setup and looked at templates there and so far the look good but I need to play with it more.

Let me know if you need more information. I post any changes that i experience.
Comment 14 Jaime Torres 2009-08-03 16:25:32 UTC
*** Bug 202377 has been marked as a duplicate of this bug. ***
Comment 15 Christian Janoff 2009-08-09 12:32:13 UTC
This problem still exists. Gentoo, KDE 4.3.
Comment 16 Christophe Marin 2009-08-23 10:53:43 UTC
*** Bug 204809 has been marked as a duplicate of this bug. ***
Comment 17 Russ Fineman 2009-08-23 20:26:41 UTC
This also happened to me today with KDE 4.3.0 Kmail 1.12.0 openSUSE 11.1 rpms Need to check and see if fix ixs in.
Comment 18 Nicolas Dietrich 2009-10-04 14:30:18 UTC
Same problem suddenly appeared on Kubuntu kmail from jaunty-backports while upgrading to kmail-4.2.4-0ubuntu1~jaunty1 or kmail-4.2.4-0ubuntu1~jaunty2.

Deleting the [GlobalTemplates] section in kmailrc fixed this.

I reported this downstream: https://bugs.launchpad.net/ubuntu/+source/kdepim/+bug/442176
Comment 19 Werner Meyer 2009-11-18 00:05:29 UTC
same problem today for me in 1.12.2 in kde 4.3.1 from suse11.2

I forwarded a message.

from then on forwarding messages via ctrl+shift+f (forwarded text inline) or replying were empty (just the subjects (and replying the To-address)) were set OK) and in the defaults I found (after reading that bug (or its duplicate) the %BLANK, which hadn't been there before obviously.

BTW:
The shortcuts 
f
F (means ctrl+f
r
a
A (means ctrl+a) 
for forwarding and replying I cannot configure but I would like to!
(There is only R (ctrl+r) as replying without quoting.)

Is there already a report for this issue?
Comment 20 Yuriy Padlyak 2009-11-27 11:27:34 UTC
Just happened to me. Kubuntu 9.10, KDE 4.3.3, KMail 1.12.3
Comment 21 Thomas McGuire 2009-11-27 22:14:00 UTC
*** Bug 216309 has been marked as a duplicate of this bug. ***
Comment 22 Sandpiper 2010-02-06 00:33:53 UTC
This just happened to me with Linux Mint 8, with KDE added via the package manager.  I was able to fix it after two or three attempts at resetting things to default.

Things that are not 'normal' with my installation are the KDE add-on to Mint 8, which is Gnome-based.  Also, my actual mail files reside on a separate 'userspace' partition, and are linked into the normal mail directory in my user account.  As such, the mail files can be accessed by two different distributions that I boot to, the other being kubuntu 9.04.
Comment 23 Björn Ruberg 2010-03-06 15:39:01 UTC
*** Bug 209895 has been marked as a duplicate of this bug. ***
Comment 24 Christoph Wickert 2010-03-31 22:24:46 UTC
Still happens with KDE 4.4.1. It used to work yesterday, but now on every start of Kontact/Kmail, the templates are blank again. When I go into the prefs and press the 'defaults' button, the templates are reset to the defaults, but this only works until I restart kmail.

Relevant parts of my kmailrc:
<<<<<<<

[GlobalTemplates]
TemplateForward=%BLANK
TemplateNewMessage=%BLANK
TemplateReply=%BLANK
TemplateReplyAll=%BLANK

...

[Templates #IDENTITY_1013602817]
QuoteString=>\s
TemplateForward=%BLANK
TemplateNewMessage=%BLANK
TemplateReply=%BLANK
TemplateReplyAll=%BLANK

[Templates #IDENTITY_1892240610]
QuoteString=>\s
TemplateForward=%REM="Default forward template"%-\n\n----------  Forwarded Message  ----------\n\nSubject: %OFULLSUBJECT\nDate: %ODATE, %OTIMELONG\nFrom: %OFROMADDR\n%OADDRESSEESADDR\n\n%TEXT\n-----------------------------------------
TemplateNewMessage=%REM="Default new message template"%-\n%BLANK
TemplateReply=%REM="Default reply template"%-\nOn %ODATE %OTIMELONG you wrote:\n%QUOTE\n%CURSOR
TemplateReplyAll=%REM="Default reply all template"%-\nOn %ODATE %OTIMELONG %OFROMNAME wrote:\n%QUOTE\n%CURSOR

>>>>>>>>

Why are there templates for different identities, if I haven't turned custom templates by identity on?
Comment 25 Christoph Wickert 2010-03-31 22:43:45 UTC
Another info that might be useful: I didn't change anything regarding the templates in the preferences dialog, but the problem appeared after adding a new identity.

Meanwhile I was able to fix the problem by deleting the three template sections listed above from my kmailrc.
Comment 26 Thomas McGuire 2010-05-20 10:01:01 UTC
*** Bug 237766 has been marked as a duplicate of this bug. ***
Comment 27 Jonathan Marten 2010-06-10 09:03:04 UTC
*** Bug 241262 has been marked as a duplicate of this bug. ***
Comment 28 Arthur Pemberton 2010-06-10 09:15:53 UTC
Would be nice if there was a "Set to Default" type functionality for the templates.
Comment 29 Jonathan Marten 2010-06-16 11:00:11 UTC
*** Bug 241261 has been marked as a duplicate of this bug. ***
Comment 30 Tim Holy 2010-08-05 23:33:19 UTC
I don't know whether this will be helpful, but I triggered this bug when I changed the server for my POP3 account. This was Kubuntu Lucid, 4.4.2.

Many thanks for posting the work-around!
Comment 31 Laurent Montel 2010-10-14 14:27:58 UTC
(In reply to comment #28)
> Would be nice if there was a "Set to Default" type functionality for the
> templates.

Now there is a "set to default" I fixed it in kdepim-4.4.6 and kdepim-trunk
Comment 32 Gökçen Eraslan 2010-10-14 14:33:52 UTC
(In reply to comment #31)
> (In reply to comment #28)
> > Would be nice if there was a "Set to Default" type functionality for the
> > templates.
> 
> Now there is a "set to default" I fixed it in kdepim-4.4.6 and kdepim-trunk

KDE 4.5?
Comment 33 Jacob R 2010-12-30 12:52:41 UTC
Me templates were all set to blank, I believe after the upgrade to 4.6 RC1.
Comment 34 Wolfgang Strehlow 2011-01-10 15:49:59 UTC
Kmail 1.13.5 (4.4.9-267-3-x86-64 from build.opensuse.de)
Linux (x86_64) release 2.6.31.14-0.6-default
Platform Version 4.5.95 (4.6 RC2)


My templates are in the right folder and look o.k., but kmail just refuses to use them. When clicking on "new mail" I just get a blank template no matter what I try.
Comment 35 Christophe Marin 2011-02-16 01:38:54 UTC
*** Bug 265569 has been marked as a duplicate of this bug. ***
Comment 36 Davor Cubranic 2011-02-16 06:25:26 UTC
A few relevant findings from bug 265569:

1. The bug bit me in KDE 4.5.1

2. "Reset to defaults" has no effect on the template settings -- they remain blank.

3. In my kmailrc, the GlobalTemplates section sets all composition templates to blank, but then there are additional templates for a couple of identities and folders that
contain what looks like the correct template. For example:

[GlobalTemplates]
PhrasesConverted=true
QuoteString=
TemplateForward=%BLANK
TemplateNewMessage=%BLANK
TemplateReply=%BLANK
TemplateReplyAll=%BLANK

[Templates #IDENTITY_214245710]
QuoteString=>%_
TemplateForward=%REM="Default forward template"%-\n\n----------  Forwarded
Message  ----------\n\nSubject: %OFULLSUBJECT\nDate: %ODATE\nFrom:
%OFROMADDR\nTo:
%OTOADDR\n\n%TEXT\n-------------------------------------------------------\n
TemplateNewMessage=%REM="Default new message template"%-\n%BLANK
TemplateReply=%REM="Default reply template"%-\nOn %ODATEEN %OTIMELONGEN you
wrote:\n%QUOTE\n%CURSOR\n
TemplateReplyAll=%REM="Default reply all template"%-\nOn %ODATEEN %OTIMELONGEN
%OFROMNAME wrote:\n%QUOTE\n%CURSOR\n

It appears, however, that only the GlobalTemplate is followed, and the per-folder setting is ignored.

See attachment 57017 [details] for a copy of my kmailrc (sensitive account information removed).
Comment 37 Davor Cubranic 2011-02-16 06:55:32 UTC
And for me, at least, what caused the templates to go blank was choosing "Prefer HTML to plain text" from Security tab of the Settings dialog. (This caused a whole bunch of settings to go haywire, see bug 254530 for details.) 

I suspect something about the config file following an upgrade from KUbuntu Lucid and KDE 4.4 was left in an inconsistent state. Then the next time I modified a single setting, a whole bunch of attributes in the config were changed by the settings code to make it happy with the settings, even if the changes were sometimes non-sensical like blanking the templates.
Comment 38 Christophe Marin 2011-05-02 11:45:59 UTC
> And for me, at least, what caused the templates to go blank was choosing
> "Prefer HTML to plain text"

Cannot reproduce with KMail2 and this step
Comment 39 Christophe Marin 2011-05-03 02:06:45 UTC
*** Bug 267440 has been marked as a duplicate of this bug. ***
Comment 40 Christophe Marin 2012-01-08 12:25:11 UTC
Closing this report. Open a kmail2 one if you're able to reproduce this issue with a recent kmail version (>=4.7.4)