Closed Bug 1498097 Opened 6 years ago Closed 6 years ago

Template removed if Send is used when Template was opened with "Edit Template".

Categories

(Thunderbird :: Message Compose Window, defect)

defect
Not set
normal

Tracking

(thunderbird_esr6063+ fixed, thunderbird63 wontfix, thunderbird64 fixed)

RESOLVED FIXED
Thunderbird 64.0
Tracking Status
thunderbird_esr60 63+ fixed
thunderbird63 --- wontfix
thunderbird64 --- fixed

People

(Reporter: sira.jet, Assigned: jorgk-bmo)

References

(Blocks 1 open bug, )

Details

(Keywords: regression)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0

Steps to reproduce:

I've been using Thunderbird for 18 yrs......Upgraded from Thunderbird 52.9.1 and noticed Thunderbird 60 and 60.2.1 won't save templates after you press [SAVE] button.

It saves a copy of that email to Templates on my PC’s local folder but after I press send and the e-mail is sent, that saved e-mail in my templates folder is deleted by TB 60 and 60.2.1. 
 



Actual results:


It saves a copy of that email to Templates on my PC’s local folder but after I press send and the e-mail is sent, that saved e-mail in my templates folder is deleted by TB 60 and 60.2.1. 



Expected results:


It should have saved a copy of that email to Templates on my PC’s local folder then after I pressed send and the e-mail is sent, that saved e-mail in my templates folder should still stay there.
Does problem go away if you have Thunderbird started in safe mode?
Flags: needinfo?(sira.jet)
We've seen this before and in the other reported case, the folder flags were wrong, so the template folder was treated as a draft folder and the message was deleted after sending.

See bug 1483177, particularly bug 1483177 comment #7.
(In reply to Wayne Mery (:wsmwk) from comment #1)
> Does problem go away if you have Thunderbird started in safe mode?

How do I start TB in safe mode ?
Flags: needinfo?(sira.jet)
(In reply to Jorg K (GMT+2) from comment #2)
> We've seen this before and in the other reported case, the folder flags were
> wrong, so the template folder was treated as a draft folder and the message
> was deleted after sending.
> 
> See bug 1483177, particularly bug 1483177 comment #7.

So how was it fixed as this never happened in TB 52.9.1 but is happening in TB 60 and 60.2.1

Can I fix it my self or can I leave this for TB's programmers to fix it and release a new version of TB.
The link to bug 1483177 comment #7 given above offers a workaround: "Alternatively, go to account settings, change the target of templates to a different folder, then change it back again."
(In reply to J Sira from comment #4)
> Can I fix it my self or can I leave this for TB's programmers to fix it and
> release a new version of TB.
In TB 60 we introduced new template functionality, see:
https://www.thunderbird.net/en-US/thunderbird/60.0/releasenotes/
"Edit Template" and "New Message from Template" commands. It is possible that a bug was introduced while making these changes. However, using "New Message from Template", double-clicking the template or simply hitting enter/return to start a new message from the template and then sending it, does NOT remove the template for me.

If the new functions now rely on the folder flags being correct, and they aren't in your data, what fix do you want us to do? The proper and also expedient fix would be to simply repair your templates folder by making another folder the template folder, and then changing it back to the original folder. Let us know if that doesn't fix the issue.
I'll try both of your methods, see which one works and get back to you with the results.
https://addons.thunderbird.net/en-US/thunderbird/addon/folderflags/ can help - it will  show whether the draft or template flag is set. If it works in TB60 you will need to disable strict compatibility preference to make it work.
That add-on still works apparently, I've tried it now. Right-click the templates folder, Properties, then look in the Flags tab.
Please check the folder flags on your template folders or re-select them as template folders in the account settings after selecting some other folder.
I just tried to install Folder Flags on TB 60 but TB 60 says - Folder Flags could not be installed as its not compatible with Thunderbird 60 - 

Again I'm stuck and will be going back to 52.1.2 until your programmers can fix this bug or provide with a solution so I can fix it my self.
Somehow you make it hard for yourself and us :-(

We told you a few times that you could just reselect the folder as template folder in the account settings (after temporarily selecting another folder). Wayne suggested an add-on and told you you needed "to disable strict compatibility preference to make it work" (comment #8). Instead you flood us with restating over and over that you have the problem, and additionally cannot install the add-on, which we already know if you don't follow the instructions. And you repeat that we should fix an alleged bug when so far we suspect that your data, that is folder flags, is simply incorrect.

Going back to TB 52 is strongly *NOT* recommended since your profile was already upgraded and there is no guarantee that anything will work if you go back.

But here is the good news: I force-upgraded the add-on to be compatible with TB 60.* since I tested it and it worked.

So in about an hour from now, search for FolderFlags in TB's Add-on Manager, search box at the top. It should be the first hit and it should install.

Alternatively, if you have already downloaded, open the Config Manager in the Advanced Options at set extensions.strictCompatibility to false while installing the add-on.
I never meant to upset any one and I apologise if I did, I simply reported the problems as I saw them.

I didn't know how to find the config Manager (as TB has no button for it in the Tools menu) but I've now worked out how to get to it.

I'll follow the instructions you have given me in your last message and will let you know the out come.
correction (but it seems comment 5 covered it) ...

In reply to Wayne Mery (:wsmwk) from comment #8)
> https://addons.thunderbird.net/en-US/thunderbird/addon/folderflags/ can help
> - it will  show whether the draft or template flag is set. If it DOES NOT work in
> TB60 you will need to disable strict compatibility preference to make it work.
Partial fix for TB 60 template prob
------------------------------------

Flags folder addon said Templates had templates flag

1) (In templates folder) click on old template, edit it and save it under [save menu] as template.
2) Updated template is saved in {template folder}.
3) After its saved close the e-mail.
5) Goto {Templates Folder}
6) Open the same e-mail in templates folder and press [send], template is sent and sent
   copy is also saved in {Sent folder}

= this works in a less efficient and slower way than in TB 52.2.1


##########################


Offline mode
------------

Flags folder addon said Templates had templates flag

1) Go in TB 60s offline mode
2) (In templates folder) click on old template, edit it and save it under [save menu] as template.
3) Updated template is saved in {template folder}.
4) After its saved close the e-mail.
5) Goto {Templates Folder}
6) Open the same e-mail in templates folder and press [send later], template is sent and sent
   copy is also saved in {Sent folder}

= this works in a less efficient and slower way than in TB 52.2.1



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



TB 52.2.1 
---------


1) {templates folder} click on old template, edit it and save it under [save menu] as template.
2) Updated template is saved in {template folder}.
3) (With that e-mail still open and copy of it saved in templates folder) press [send], template is sent and sent
   copy is also saved in {Sent folder}

= this works in a more efficient and faster way than in TB 60


############################################


Offline mode
------------


1) Switch to TB 52.2.1 offline mode
2) {templates folder} click on old template, edit it and save it under [save menu] as template.
3) Updated template is saved in {template folder}.
4) (With that e-mail still open and copy of it saved in templates folder) press [send later], template is sent and sent
   copy is also saved in {Sent folder}

= this works in a more efficient and faster way than in TB 60



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



TBs programmers need to make TB 60s template function the same and as fast as TB 52.2.1's template function as I described above.
OK, I finally see what you did and where the problem lies:

STR (steps to reproduce):
Open a template with "Edit Template"
Make modifications. Save.
Then send.

Result:
Template is removed from Templates folder.

===

Frankly, we didn't imagine anyone using it like this. We wanted to distinguish "Edit Template" and "New Message from Template". But you are correct, when you send during "Edit Template", you lose the template.

Thomas?
Blocks: 1389062
Status: UNCONFIRMED → NEW
Component: Untriaged → Message Compose Window
Ever confirmed: true
Flags: needinfo?(bugzilla2007)
Keywords: regression
Summary: Template saving bug in TB 60 and 60.2.1 → Template removed if Send is used when Template was opened with "Edit Template".
The bug is a combination of adding the existing draft ID onto the edited template:
https://hg.mozilla.org/comm-central/rev/5dd349d1efbc#l7.91

and then deleting the original here from the templates folder:
https://hg.mozilla.org/comm-central/rev/5dd349d1efbc#l5.16

That processing is OK for edit template and save, but it's not OK for sending the template during an "edit template". Sigh.
This does the trick. You need to test with send and "send later".
Assignee: nobody → jorgk
Status: NEW → ASSIGNED
Flags: needinfo?(bugzilla2007)
Attachment #9016965 - Flags: review?(acelists)
Comment on attachment 9016965 [details] [diff] [review]
1498097-dont-delete-template-when-sending.patch

Review of attachment 9016965 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks, this works for me.

I just noticed a related bug, that if you Edit a template and wait long enough for the autosave to trigger, the template gets deleted from the templates folder. You still have the template open, so you can save it into Templates again, but it still is wrong. This should be filed as a new bug.
Attachment #9016965 - Flags: review?(acelists) → review+
Indeed, bug 1498866.
Attachment #9016965 - Flags: approval-comm-esr60+
Attachment #9016965 - Flags: approval-comm-beta+
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/33c8749ebc80
never delete template when sending. r=aceman DONTBUILD
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
In view of bug 1498866, this seems more like a band-aid solution, but let's go with it for now.
Target Milestone: --- → Thunderbird 64.0
Thanks for looking in to this, glad you can see my side.

I'm still using TB60 but how do I patch TB60 with the new code you made in this web link
-
https://hg.mozilla.org/releases/comm-esr60/rev/86faf734312c 

or in this weblink
-
https://hg.mozilla.org/comm-central/rev/33c8749ebc80
I'll wait until you make the next version of TB bug free, in the mean time I'll try to use TB60 or 52.2.1 using an old backup I made of my profile before I upgraded from 52.2.1 to 60.

Thank you for all your support and help I appreciate it.

On my linkedin profile I'll put comment 17 as temp bug fix so my connections can use it.

I've always been told TB is 32 bit, In the future will you be making TB 64 bit and will TB always be free like Firefox.
Well, what I offered now will be part of TB 60.3 coming out at the end of the month. It would be best to try it now ;-) - Yes, we have 64bit builds of Thunderbird, and yes, it will always be free, but donations are welcome to pay our team.
Blocks: 1500659
(In reply to Jorg K (GMT+2) from comment #18)
> OK, I finally see what you did and where the problem lies:
> 
> STR (steps to reproduce):
> Open a template with "Edit Template"
> Make modifications. Save.
> Then send.
> 
> Result:
> Template is removed from Templates folder.
> 
> ===
> 
> Frankly, we didn't imagine anyone using it like this. We wanted to
> distinguish "Edit Template" and "New Message from Template". But you are
> correct, when you send during "Edit Template", you lose the template.
> 
> Thomas?

Jörg, "Edit Template" feature is unfinished because of bug 1417788: We do not indicate "Edit Template" mode in the title bar (so there's all but no indication at all, only the radio checkmark on "Template" in the dropdown of Save button). Worse, we actually still indicate "Write" mode when we are already in "Edit Template" mode. That's where we are confusing users like reporter because we have disentangled the two modes (for good reason), but we only went half-way.

In fact, looking at reporter's customary workflow in comment 17, imo we must push the disentangling even further to avoid unclear template states and confusing hybrid workflows:

Proposal: Fully disentangle "Edit Template" vs. "New Msg from Template":
1) Bug 1417788: Indicate active "Edit Template" mode in title bar.
2) Bug 1500659: For "Edit Template" mode, replace [Send] button with [Use Template] button

(In reply to J Sira from comment #17)
> TB 52.2.1 
> 1) {templates folder} click on old template, edit it and save it under [save
> menu] as template.

TB 52 does NOT edit the actual template, it creates a new msg from template.

> 2) Updated template is saved in {template folder}.

No, for TB52, a NEW template is created in template folder, and the old template keeps hanging around as useless clutter, which is undesirable. That's why we have introduced an explicit "Edit Template" mode for TB60.

> 3) (With that e-mail still open and copy of it saved in templates folder)
> press [send], template is sent and sent
>    copy is also saved in {Sent folder}

For TB 52 (and still in TB 60) this is a highly confusing UI state because as reporter said, he believes to be editing the template but at the same time he also wants to create a new message from template, which I believe may typically/often involve individual deviations from the template, like changing customer's name, dates, sales figures etc. in the body. For many workflows, saving the individual deviations into the template is undesired, but as long as we allow hybrid mode which mixes "Edit Template" and "New Msg from Template", it's very hard to tell where the "Edit Template" ends and the "New Msg..." starts.

> = this works in a more efficient and faster way than in TB 60

At the cost of NOT having an "Edit Template" mode and hence creating dozens of outdated templates along the way. As explained above, imo we must fully disentangle the two modes. That said, with my proposed changes there's no loss of efficiency, just a minimally changed, clearer workflow: When done with "Edit Template" (which is now clearly indicated in title bar), just click "New Message from Template", do per-message edits, then send.

> TBs programmers need to make TB 60s template function the same and as fast
> as TB 52.2.1's template function as I described above.

With my proposed changes, "Edit Template" vs. "New Msg from Template" will be fully disentangled (which is helpful and required), without losing efficiency, but gaining clarity of mode, i.e. what goes into the template and what goes only into the individual message.
(In reply to J Sira from comment #17)

Hello J Sira, per comment 28 you are offering your instructions of comment 17 to others.
I think they should be improved to be more accurate and informative.

Please note that "Edit Template" and "New Message from Template" are two quite different actions which unfortunately have not yet been fully disentangled. Bug 1417788 will indicate "Edit Template" mode in the title bar. For "Edit Template" mode, bug 1500659 will replace the [Send] button with [Use Template] button to eliminate the current confusing hybrid UX and clearly separate |updating the template| vs. |composing a template-based message|.

> Partial fix for TB 60 template prob
> ------------------------------------
It's not a fix, it's a workaround for a problem which would never occur if templates are used correctly according to the new logic of TB 60. Admittedly, as I outlined in my comment 31, the current implementation is incomplete hence inviting wrong use patterns with undefined states. Furthermore, the problem of this bug has been fixed and the fix will be rolled out soon, so pls also note the temporary nature of your "workaround".

TB 60 - How to update a template before using it to send a new message
(incl. workaround for http://bugzil.la/1498097; this bug has been fixed for TB 60.3)

Step 1: Update template (Edit template, then save & close)
a) In {Templates} folder, right-click on existing template, then choose "Edit Template" from context menu.
b) Edit the template as needed.
c) Save updated template using [Save] button or Ctrl+S; save-as-template is already preselected.
--> Updated template is saved in {Templates} folder.
c) After saving, close the template message (important! workaround for the bug described below).
Note: Do NOT use [Send] directly from "Edit Template" mode. This will remove the template (bug 1498097; fixed for TB 60.3).

Step 2: New message from template
a) In {Templates} folder, double-click or press [Enter] on the updated template to create a "New Message from Template".
b) Apply any edits for this particular message.
c) Send message using [Send] button or Ctrl+Enter.
--> The template remains unchanged; a copy of your sent message will be saved in {Sent} folder.
(In reply to Thomas D. (currently busy elsewhere) from comment #32)
> (In reply to J Sira from comment #17)
> 
> Hello J Sira, per comment 28 you are offering your instructions of comment
> 17 to others.
> I think they should be improved to be more accurate and informative.
> 
> Please note that "Edit Template" and "New Message from Template" are two
> quite different actions which unfortunately have not yet been fully
> disentangled. Bug 1417788 will indicate "Edit Template" mode in the title
> bar. For "Edit Template" mode, bug 1500659 will replace the [Send] button
> with [Use Template] button to eliminate the current confusing hybrid UX and
> clearly separate |updating the template| vs. |composing a template-based
> message|.
> 
> > Partial fix for TB 60 template prob
> > ------------------------------------
> It's not a fix, it's a workaround for a problem which would never occur if
> templates are used correctly according to the new logic of TB 60.
> Admittedly, as I outlined in my comment 31, the current implementation is
> incomplete hence inviting wrong use patterns with undefined states.
> Furthermore, the problem of this bug has been fixed and the fix will be
> rolled out soon, so pls also note the temporary nature of your "workaround".
> 
> TB 60 - How to update a template before using it to send a new message
> (incl. workaround for http://bugzil.la/1498097; this bug has been fixed for
> TB 60.3)
> 
> Step 1: Update template (Edit template, then save & close)
> a) In {Templates} folder, right-click on existing template, then choose
> "Edit Template" from context menu.
> b) Edit the template as needed.
> c) Save updated template using [Save] button or Ctrl+S; save-as-template is
> already preselected.
> --> Updated template is saved in {Templates} folder.
> c) After saving, close the template message (important! workaround for the
> bug described below).
> Note: Do NOT use [Send] directly from "Edit Template" mode. This will remove
> the template (bug 1498097; fixed for TB 60.3).
> 
> Step 2: New message from template
> a) In {Templates} folder, double-click or press [Enter] on the updated
> template to create a "New Message from Template".
> b) Apply any edits for this particular message.
> c) Send message using [Send] button or Ctrl+Enter.
> --> The template remains unchanged; a copy of your sent message will be
> saved in {Sent} folder.

Hi Thomas 

For me this temp fix (as I call it) or work around (as you call it) works for the time being.

I've always used TB the way I described it as its fast.

Since my last message I've gone back to TB 52.2.1 as it feels faster than TB60 work around but my anti virus software says due to potential risks I need to get TB60 or higher....

When your team have fixed the bugs in TB 60.2.1. I'll down load and use the latest version of TB.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: