Closed
Bug 57083
Opened 25 years ago
Closed 25 years ago
Message lost after canceling the char code warning.
Categories
(MailNews Core :: Networking, defect, P3)
MailNews Core
Networking
Tracking
(Not tracked)
VERIFIED
FIXED
mozilla0.9
People
(Reporter: tarahim, Assigned: nhottanscp)
Details
(Keywords: dataloss)
Attachments
(1 file)
|
3.53 KB,
patch
|
Details | Diff | Splinter Review |
When a character code warning appears on Save(bug 577080), you have a choice of
"Confirm to Send"(which is wrong in this context) and "Cancel"(supposed to go
back to compose window).
But the result is "Confirm to Send" brings you back to compose window while
"Cancel" just close the window and the message gets lost.
There should be a way to guarantee that the composed text not be lost at all in
the context of any other bug.
| Reporter | ||
Comment 1•25 years ago
|
||
Ooops. That Bug no. is 57080. However, 57080 has changed a bit. So, to get the
char code warning: You type Japanese text in the Subject while the char coding
is actually set to Western(ISO8859-1). Then Save as Draft.
| Reporter | ||
Comment 2•25 years ago
|
||
In today's build, the bahavior I saw different behavior.
The only case I got message lost was:
1)Open message compose by New Message. (ISO-8859-1 is the default.)
2)Compose in Japanese.
3)Click close switch in the window title bar.
4)Mozilla asks if you want to save or not, and you choose to save.
5)Character code warning for Send appears, and you choose to cancel as suggested
by the text in the warning so you can go back and select the coding.
6)Compose window disappears and the message is lost.
Obviously, "Cancel" in 5) is behaving as the same as "Don't save" instead of
"Cancel" in the dialog that appears in 4).
Comment 5•25 years ago
|
||
cc'ing nhotta who wrote the char warning dialog stuff.
| Assignee | ||
Comment 6•25 years ago
|
||
cc to IQA, is this still reproducible?
Comment 7•25 years ago
|
||
nominating means putting in the keywords, not in the target milestone. I'm
nominating nsbeta1 which will put this on the radar. reassigning to nhotta
since it sounds like he's the one who wrote this.
it doesn't happen with 2001-02-01-04 build, after clicking 'Cancel' you're back
to Compose window and you can change char coding (though the window looses focus)
| Assignee | ||
Comment 9•25 years ago
|
||
Marina, did you test Macintosh build?
Comment 10•25 years ago
|
||
yes, Mac 9.0 and it's fixed
| Assignee | ||
Comment 11•25 years ago
|
||
Mark as WORKSFORME, please reopen if reproducible.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → WORKSFORME
| Reporter | ||
Updated•25 years ago
|
Status: RESOLVED → REOPENED
Resolution: WORKSFORME → ---
| Reporter | ||
Comment 12•25 years ago
|
||
I tested in 2001020108 and it is still happening.
You have to follow the steps precisely in 10-24 posting. It happens when you try
to save it first and get the char code warning, then try to go back->you can not.
Reopening.
Comment 13•25 years ago
|
||
The case of Canceling the Send operation with different endings is fixed.
Cancel the "Save to Drafts" is still loosing the compose window, so confirming
the reopening.
| Assignee | ||
Updated•25 years ago
|
Status: REOPENED → ASSIGNED
Target Milestone: Future → mozilla0.9
| Assignee | ||
Comment 14•25 years ago
|
||
Functions in the JS code do not return error codes in many cases (e.g.
SaveAsDraft, GenericSendMessage).
Because SaveAsDraft does not return error code, the caller cannot know if the
save as succeeded or not. So it closes the window even if the user hit the
cancel button.
I will try to change the functions to return error but the change would be
non-trivial.
Jean-Francois, is this (ignoring the error) is done intentionally?
Comment 15•25 years ago
|
||
If I remember right, those process are asynchronous, therefore returning an
error code want solve the problem. The right place to look is in the listener
function OnStopRequest, probably nsMsgComposeSendlistener::OnStopRequest
| Assignee | ||
Comment 16•25 years ago
|
||
You are right, so the JS code cannot know about the error and always close the
window.
So I am seing nsMsgComposeSendListener::OnStopSending is called after the window
is gone.
We could check the charset conversion error before we actually send (like the
spell checking). But that's an overhead since we need to convert the sending
text twice just to make sure for no convesion error.
Or we may change to pop up the multilingual alert only for send now, not for
save as draft, send later, etc.
Jean-Francois, what do you think?
OS: Mac System 8.6 → All
Hardware: Macintosh → All
Comment 17•25 years ago
|
||
We are not closing the window but just hidding it when we send/save a message.
When we receive the OnStopRequest call, we look if we get have an error. If yes
we show back the window else we close the window. Therefore, you need to check
in OnStopRequest if we correctly detect the error.
| Assignee | ||
Comment 18•25 years ago
|
||
I cannot find OnStopRequest for nsMsgComposeSendListener, can I do the error
check in OnStopSending.
Comment 19•25 years ago
|
||
sorry, I mean OnStopSending.
| Assignee | ||
Comment 20•25 years ago
|
||
Or nsMsgComposeSendListener::OnStopCopy, since this bug happens when saving as
draft?
Comment 21•25 years ago
|
||
right.
| Assignee | ||
Comment 22•25 years ago
|
||
I found it does not hit OnStopCopy() because the error happens in
nsMsgCompose::SendMsg before the thread for save message is created.
And the window is always closed by the JS code below regardless of the error.
This is a special situation that the user explicitly closed the window then we
ask if the document should be saved or not. So the only case the window does not
close is when the user hit cancel at the first alert ("want to save?") and
ComposeCanClose() returns false. All other cases, the window is closed.
513 function DoCommandClose()
514 {
515 if (ComposeCanClose())
516 CloseWindow()
517 }
518
| Assignee | ||
Comment 23•25 years ago
|
||
So, I cannot check the error in OnStopCopy.
I will try if I can check the charset conversion error in JS, or enable the
alert only for send now.
| Assignee | ||
Comment 24•25 years ago
|
||
I tried the conversion check in JS. It is possible to catch a conversion error
in JS. So we can ask the user if the user wants to go back to the editor before
appling the real conversion in cpp part.
But if the user wants to save it anyway, then we proceed and do the real
conversion in cpp code and the user would be asked again about the same
conversion error. There is no way to detect every unconvertible character and
discard them before calling the cpp code, so we cannot avoid alerting the user
twice.
So my current plan is to enable the alert for send now only.
| Reporter | ||
Comment 25•25 years ago
|
||
Is it difficult to have a general fix for "message lost after send error" like
bug 55236?
| Assignee | ||
Comment 26•25 years ago
|
||
I may be able to take advantage if there is a fix for bug 55236. The JavaScript
code needs to catch the send error (including asynchronous one) to avoid closing
the compose window.
| Assignee | ||
Comment 27•25 years ago
|
||
There is another instance of the problem.
When I set a draft folder as IMAP folder then do the same step as this bug with
all ASCII text. After canceling the password dialog, the windows is closed and
the data is lost.
| Assignee | ||
Comment 28•25 years ago
|
||
Comment 29•25 years ago
|
||
R=ducarroz
Comment 30•25 years ago
|
||
sr=bienvenu for the workaround.
| Assignee | ||
Comment 31•25 years ago
|
||
checked in
Status: ASSIGNED → RESOLVED
Closed: 25 years ago → 25 years ago
Resolution: --- → FIXED
Comment 32•25 years ago
|
||
Marina, can you test this one too since you verified 57080. What's left of
this bug requires bringing up the character code warning during a Save as Draft
operation. Cancelling it to see if the Compose window is still up front. If
you can't verify this, can you instruct me again on how to type Japanese text in
the Subject while character coding is set to Western (ISO-8859-1).
Comment 33•25 years ago
|
||
Naoki, aren't we supposed to have a warning when saving to Drafts a message with
different encodings??? i don't see it coming up when i am saving a japanese
message with iso-8859-1, only in the Send operation
| Assignee | ||
Comment 35•25 years ago
|
||
It was changed to alert for send now only.
Comment 36•25 years ago
|
||
then how can we Save to Drafts correctly if no warning comes up? when different
encodings are not detected the message copied to Drafts becomes unreadable.
| Assignee | ||
Comment 37•25 years ago
|
||
It is a workaround to avoid losing everything which may happen in the situation
as describled in this bug.
Comment 38•25 years ago
|
||
the scenario described in this bug report (loosing a message after canceling the
warning dlg)is not happening any more though the workaround doesn't prevent the
user from Saving in the wrong charset to Drafts: Verifying
Status: RESOLVED → VERIFIED
Comment 39•24 years ago
|
||
Bug 89655 (No charset confirmation dialog when "Send Later" is used) and bug
104135 (Save as -> Draft should produce a charset mismatch warning) ask for the
restoration of the charset dialog for "Send Later" and "Save as Draft".
Updated•21 years ago
|
Product: MailNews → Core
Updated•17 years ago
|
Product: Core → MailNews Core
You need to log in
before you can comment on or make changes to this bug.
Description
•