Last Comment Bug 718480 - Unable to save new message as file when subject is empty
: Unable to save new message as file when subject is empty
Status: RESOLVED FIXED
: regression
Product: Thunderbird
Classification: Client Software
Component: Message Compose Window (show other bugs)
: 11 Branch
: All All
: -- normal (vote)
: Thunderbird 13.0
Assigned To: Magnus Melin
:
Mentors:
: 740333 741833 757390 (view as bug list)
Depends on:
Blocks: 102275
  Show dependency treegraph
 
Reported: 2012-01-16 11:27 PST by raal
Modified: 2012-05-22 04:08 PDT (History)
8 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
-


Attachments
proposed fix (3.83 KB, patch)
2012-02-26 11:44 PST, Magnus Melin
no flags Details | Diff | Review
proposed fix v2 (7.84 KB, patch)
2012-02-29 12:27 PST, Magnus Melin
neil: review-
Details | Diff | Review
proposed fix v3 (8.77 KB, patch)
2012-03-01 05:05 PST, Magnus Melin
no flags Details | Diff | Review
proposed fix v4 (8.75 KB, patch)
2012-03-05 11:43 PST, Magnus Melin
neil: review-
Details | Diff | Review
proposed fix v5 (6.68 KB, patch)
2012-03-11 12:22 PDT, Magnus Melin
neil: review+
Details | Diff | Review

Description raal 2012-01-16 11:27:48 PST
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
Comment 1 Wayne Mery (:wsmwk, NI for questions) 2012-01-19 03:59:30 PST
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
Comment 2 raal 2012-01-19 06:00:12 PST
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
Comment 3 raal 2012-02-03 09:25:01 PST
In TB 12.0a2 still the same problem -  Save as -> File -> do nothing.
Comment 4 Magnus Melin 2012-02-04 05:04:32 PST
Works for me on linux trunk too.
Is your messenger.save.dir pref somehow invalid perhaps?
Comment 5 raal 2012-02-05 00:48:38 PST
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.
Comment 6 Mark Banner (:standard8) 2012-02-23 06:45:51 PST
Do you have a signature enabled which includes images?
Comment 7 raal 2012-02-23 07:54:20 PST
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.
Comment 8 Magnus Melin 2012-02-26 11:38:01 PST
Regression from bug 102275; referenceerror for gUntitledString.
Comment 9 Magnus Melin 2012-02-26 11:44:46 PST
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 :/
Comment 10 neil@parkwaycc.co.uk 2012-02-26 14:21:38 PST
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.
Comment 11 Magnus Melin 2012-02-26 22:17:20 PST
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.)
Comment 12 neil@parkwaycc.co.uk 2012-02-27 01:12:56 PST
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.
Comment 13 Magnus Melin 2012-02-27 11:25:19 PST
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 :)
Comment 14 neil@parkwaycc.co.uk 2012-02-27 11:33:42 PST
Sorry, I tested it with HTML email so it offered to save as .html by default.
Comment 15 Magnus Melin 2012-02-27 11:54:54 PST
Yes, but didn't it always? (before bug 102275)
Comment 16 neil@parkwaycc.co.uk 2012-02-27 15:35:06 PST
Sorry, I was referring to the suffix of the base name, not the extension.
Comment 17 Magnus Melin 2012-02-29 12:27:04 PST
Created attachment 601708 [details] [diff] [review]
proposed fix v2

Don't use the global for suggested filename.
Comment 18 neil@parkwaycc.co.uk 2012-02-29 12:41:53 PST
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"...
Comment 19 neil@parkwaycc.co.uk 2012-02-29 12:56:51 PST
(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?
Comment 20 Magnus Melin 2012-03-01 05:05:54 PST
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".
Comment 21 neil@parkwaycc.co.uk 2012-03-01 06:15:49 PST
(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 :-)
Comment 22 Magnus Melin 2012-03-05 11:43:41 PST
Created attachment 602992 [details] [diff] [review]
proposed fix v4
Comment 23 neil@parkwaycc.co.uk 2012-03-06 06:20:47 PST
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 :-(
Comment 24 Magnus Melin 2012-03-11 12:22:21 PDT
Created attachment 604785 [details] [diff] [review]
proposed fix v5

This has the original behavior, the no-op places gUntitledString was used are now removed.
Comment 25 neil@parkwaycc.co.uk 2012-03-11 16:42:11 PDT
Comment on attachment 604785 [details] [diff] [review]
proposed fix v5

Thanks!
Comment 26 Magnus Melin 2012-03-12 12:42:30 PDT
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.
Comment 27 Mark Banner (:standard8) 2012-03-13 05:15:38 PDT
String changes mean we can't take this forward onto branches. So we'll let it ride out in 13.
Comment 28 Magnus Melin 2012-04-03 22:43:44 PDT
*** Bug 741833 has been marked as a duplicate of this bug. ***
Comment 29 Anje 2012-04-12 08:12:54 PDT
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
Comment 30 :aceman 2012-04-19 23:53:02 PDT
*** Bug 740333 has been marked as a duplicate of this bug. ***
Comment 31 Magnus Melin 2012-05-22 04:08:12 PDT
*** Bug 757390 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.