Unable to save new message as file when subject is empty

RESOLVED FIXED in Thunderbird 13.0

Status

Thunderbird
Message Compose Window
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: raal, Assigned: Magnus Melin)

Tracking

({regression})

11 Branch
Thunderbird 13.0
regression

Thunderbird Tracking Flags

(thunderbird11-)

Details

Attachments

(1 attachment, 4 obsolete attachments)

(Reporter)

Description

5 years ago
User Agent: Mozilla/5.0 (Ubuntu; X11; Linux i686; rv:9.0.1) Gecko/20100101 Firefox/9.0.1
Build ID: 20111221202246

Steps to reproduce:

TB 11.0a2(2012-01-15) 
 - Write new e-mail
 - Menu File -> Save as -> File


Actual results:

nothing


Expected results:

open save dialog
tracking-thunderbird11: --- → ?
Keywords: regression
Summary: unable to save new message as file [regression] → Unable to save new message as file
raal, does this fail for you if you start in safe mode?
 http://support.mozillamessaging.com/en-US/kb/safe-mode?s=safe&as=s
anything in error console?

works for me with current trunk
(Reporter)

Comment 2

5 years ago
In safe mode still problem.
error console :
Timestamp: 19.1.2012 14:56:24
Warning: Use of getAttributeNodeNS() is deprecated. Use getAttributeNS() instead.
Source File: chrome://messenger/content/messenger.xul
Line: 0

Timestamp: 19.1.2012 14:56:34
Warning: Unknown property 'box-sizing'.  Declaration dropped.
Source File: https://www.mozilla.org/en-US/thunderbird/earlybird/start/?uri=/thunderbird/start&locale=en-US&version=11.0a2&os=Linux&buildid=20120118030021
Line: 15
(Reporter)

Comment 3

5 years ago
In TB 12.0a2 still the same problem -  Save as -> File -> do nothing.
(Assignee)

Comment 4

5 years ago
Works for me on linux trunk too.
Is your messenger.save.dir pref somehow invalid perhaps?
(Reporter)

Comment 5

5 years ago
messenger.save.dir is set to /tmp
Tried to create new profile, but no luck. I can save message from mail folder ( for example from Drafts), but cannot save new e-mail.
Do you have a signature enabled which includes images?
(Reporter)

Comment 7

5 years ago
No signature nor images, just text e-mail.
But I found the problem - when subject is empty, then I cannot save as file. When subject is not empty then I can save as file.
(Assignee)

Updated

5 years ago
Summary: Unable to save new message as file → Unable to save new message as file when subject is empty
(Assignee)

Comment 8

5 years ago
Regression from bug 102275; referenceerror for gUntitledString.
Assignee: nobody → mkmelin+mozilla
Blocks: 102275
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
OS: Linux → All
Hardware: x86 → All
(Assignee)

Comment 9

5 years ago
Created attachment 600793 [details] [diff] [review]
proposed fix

Fixes it for me. There sure are a lot of (unnecessary) try/catches that hide errors here :/
Attachment #600793 - Flags: review?(neil)
Comment on attachment 600793 [details] [diff] [review]
proposed fix

Oops, I didn't realise that message compose used this to set its default file name. Bug 102275 wasn't designed for the recycled compose window case; I'm not sure that saving all messages as "untitled-1.html" is a good move. Unless you can find an easy fix, I would suggest backing out and reopening bug 102275.
Attachment #600793 - Flags: review?(neil)
(Assignee)

Comment 11

5 years ago
Hmm, for messages with no subject there's really no good default name. Did you have a suggestion? (It did used to be untitled.txt/untitled.html earlier.)
My issue was with the suffix (which depends on your cached window reuse rather than anything meaningful) that your patch happens to give to the file names - I've got no problem with just "untitled" on its own for the message window.
(Assignee)

Comment 13

5 years ago
At least on linux the filename is actually untitled-1.asc for some reason (bug 567507)

However, the patch from bug 102275 doesn't seem to affect extension, only the base name. So i'm still a bit confused on what you wanted changed :)
Sorry, I tested it with HTML email so it offered to save as .html by default.
(Assignee)

Comment 15

5 years ago
Yes, but didn't it always? (before bug 102275)
Sorry, I was referring to the suffix of the base name, not the extension.
(Assignee)

Comment 17

5 years ago
Created attachment 601708 [details] [diff] [review]
proposed fix v2

Don't use the global for suggested filename.
Attachment #600793 - Attachment is obsolete: true
Attachment #601708 - Flags: review?(neil)
Comment on attachment 601708 [details] [diff] [review]
proposed fix v2

>-  var promptService = GetPromptService();
>-  if (!promptService) return false;
>-
>   var result = {value:null};
>   var captionStr = GetString("DocumentTitle");
>   var msgStr = GetString("NeedDocTitle") + '\n' + GetString("DocTitleHelp");
>   var confirmed = promptService.prompt(window, captionStr, msgStr, result, null, {value:0});
This doesn't look right...

This now reverts Composer's default file name to "untitled" even though the window displays "untitled-N"...
Attachment #601708 - Flags: review?(neil) → review-
(In reply to comment #18)
> This now reverts Composer's default file name to "untitled" even though the
> window displays "untitled-N"...
Actually I could probably live with this, but then I think you could localise your changes to GetSuggestedFileName, couldn't you?
(Assignee)

Comment 20

5 years ago
Created attachment 601930 [details] [diff] [review]
proposed fix v3

I assume you wanted the "abandon changes" dialog to also not use numbered names. 
Anyway, using global variables across several js files do make things hard to follow. (Now gUntitledString is only used in editor.js + EditorPublishProgress.js)

Dunno what you meant by "localise your changes to GetSuggestedFileName".
Attachment #601708 - Attachment is obsolete: true
Attachment #601930 - Flags: review?(neil)
(In reply to Magnus Melin from comment #20)
> I assume you wanted the "abandon changes" dialog to also not use numbered names. 
Actually, that's also wrong, it should use the file name (there should always be a file, because you can't abandon about:blank) - and in fact the unsaved changes prompt should also use the file name if possible. But those are separate bugs - at least, as far as I can tell...

> Anyway, using global variables across several js files do make things hard
> to follow. (Now gUntitledString is only used in editor.js +
> EditorPublishProgress.js)
By all means move the declaration of gUntitledString if you think it makes things clearer, but I don't want message compose calling GetNextUntitledValue.

> Dunno what you meant by "localise your changes to GetSuggestedFileName".
You just explained it anyway :-)
(Assignee)

Comment 22

5 years ago
Created attachment 602992 [details] [diff] [review]
proposed fix v4
Attachment #601930 - Attachment is obsolete: true
Attachment #601930 - Flags: review?(neil)
Attachment #602992 - Flags: review?(neil)
Comment on attachment 602992 [details] [diff] [review]
proposed fix v4

Sorry, but this patch makes things worse.
Steps to reproduce problem:
1. Start with message compose
2. Open a new composer page
3. Open a file into the composer
4. Open another new composer page
Original result: untitled-1, untitled-2
Previous patches: untitled-2, untitled-3
This patch: untitled-2, untitled-4 :-(
Attachment #602992 - Flags: review?(neil) → review-
(Assignee)

Comment 24

5 years ago
Created attachment 604785 [details] [diff] [review]
proposed fix v5

This has the original behavior, the no-op places gUntitledString was used are now removed.
Attachment #602992 - Attachment is obsolete: true
Attachment #604785 - Flags: review?(neil)
Comment on attachment 604785 [details] [diff] [review]
proposed fix v5

Thanks!
Attachment #604785 - Flags: review?(neil) → review+
(Assignee)

Comment 26

5 years ago
http://hg.mozilla.org/comm-central/rev/ba06afbb5121
->FIXED

Not sure what we want to do for the other branches, as there are sting changes.
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 13.0
String changes mean we can't take this forward onto branches. So we'll let it ride out in 13.
tracking-thunderbird11: ? → -
(Assignee)

Updated

5 years ago
Duplicate of this bug: 741833

Comment 29

5 years ago
Just updated to 11.0.1. 
Save as File will not function unless you enter something in the 'Subject' line.
Users are trying to save the File to use as a signature, so the Subject line needs to be blank.  This function worked prior to upgrading.

This is also being reported in the forums.
Users are using v.11.0.1 and OS: 
Vista, Windows 7 and Mac OS X version 10.6.8, TB 11.0.1

https://getsatisfaction.com/mozilla_messaging/topics/file_save_as_file?utm_content=topic_link&utm_medium=email&utm_source=reply_notification

Updated

5 years ago
Duplicate of this bug: 740333
(Assignee)

Updated

5 years ago
Duplicate of this bug: 757390
You need to log in before you can comment on or make changes to this bug.