Closed Bug 1702852 Opened 4 years ago Closed 4 years ago

Recipient email address saved in message draft disappears when re-opening/editing draft [add-on API issue]

Categories

(Thunderbird :: Add-Ons: Extensions API, defect)

Thunderbird 88
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1702957

People

(Reporter: halle_saale, Unassigned)

References

Details

(Whiteboard: [affects add-ons only])

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

Steps to reproduce:

I entered the email address, then a subject. Then I saved the mail.
If I then want to edit it, the email address line is empty.

Actual results:

email address is not saved

Expected results:

The complete mail should be saved, including the email address.

I'm not seeing this on beta.
Does it happen after doing Help > restart with add-ons disabled?

Flags: needinfo?(halle_saale)

Same here. Testing with 88.0 b2. Used some made up email address and generic subject line, CTRL-S to save as Draft, went to Drafts folder and re-opened message and the made up email address and generic subject was still intact.

The only add-on I have installed is "Signature Switch". If this is disables, then the email address is also saved.
Okay, then this is reason, But why?

Flags: needinfo?(halle_saale)

(In reply to halle_saale from comment #3)

The only add-on I have installed is "Signature Switch". If this is disables, then the email address is also saved.
Okay, then this is reason, But why?

Hard to say without code inspection but maybe reaching out to the Extension author and letting them know about it might be a good place to start. Point the author to this bug report as well.

This might yield some info:

Start TB normaslly and then...

  1. Do a CTRL-SHIFT-J to open Error Console
  2. Click the garbage can up at top left to clear the screen
  3. With Error Console still open, switch back to TB
  4. Try to reproduce your steps that causes the bug

I would think that once you save as Draft, the issue will be present so switch back to the Error Console and see if any error is there that might refer to the email address not being saved.

(In reply to halle_saale from comment #3)

The only add-on I have installed is "Signature Switch". If this is disables, then the email address is also saved.
Okay, then this is reason, But why?

So per reporter's comment 3, this is caused by SignatureSwitch add-on (so it's invalid as a Thunderbird bug, falls into addon author's responsiblity).
Iiuc, STR are: compose, enter recipient, save as draft, close, re-open draft -> recipient gone.

We have seen somewhat similar problems with SignatureSwitch add-on in Bug 1696765.

Achim (addon-author), could you comment?

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Flags: needinfo?(git)
Resolution: --- → INVALID
See Also: → 1696765
Whiteboard: [addon: Signature Switch]

(In reply to Thomas D. (:thomas8) from comment #6)

We have seen somewhat similar problems with SignatureSwitch add-on in Bug 1696765.
Achim (addon-author), could you comment?

Sure.

As John already stated:

Yes, requested by add-on developers getComposeDetails should contain partially entered values, which needed an enforced pillification. Hm. Achim is not doing something illegal. How do we solve this? Lets move this discussion over to bug 1681008.

The add-on is using pure WebExtension/MailExtension APIs... no experiments or other "hacky code" (imho).

The sourcecode can be found here:
https://github.com/4ch1m/mozext/tree/master/signatureswitch-me

I haven't yet found the time to investigate which parts of the base code are broken or lead to the described behaviour.

Flags: needinfo?(git)

.

Summary: email address is not saved in mail draft → Recipient email address saved in message draft disappears when re-opening/editing draft [caused by SignatureSwitch add-on]

Sorry for the noise, but I'm going to reshuffle this a bit.
Hadn't seen that duplicate bug 1702957 was filed by Achim himself (addon-author of SignatureSwitch).
So let's sort it out there.

Resolution: INVALID → DUPLICATE

I have posted a quick fix for the add-on here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1702957#c6

But it is a bug in the API, Achim did nothing wrong. Working on a fix in the other bug.

(In reply to John Bieling (:TbSync) from comment #10)

I have posted a quick fix for the add-on here:
https://bugzilla.mozilla.org/show_bug.cgi?id=1702957#c6

But it is a bug in the API, Achim did nothing wrong. Working on a fix in the other bug.

Ah alright, now I get it! Let's correct the summary then.

Component: Mail Window Front End → Add-Ons: Extensions API
Summary: Recipient email address saved in message draft disappears when re-opening/editing draft [caused by SignatureSwitch add-on] → Recipient email address saved in message draft disappears when re-opening/editing draft [add-on API issue]
Whiteboard: [addon: Signature Switch] → [affects add-ons only]
You need to log in before you can comment on or make changes to this bug.