Last Comment Bug 832760 - NNTP: It fails to save (autosave) a new message while editing the newsgroup-header
: NNTP: It fails to save (autosave) a new message while editing the newsgroup-h...
Status: RESOLVED FIXED
:
Product: Thunderbird
Classification: Client Software
Component: Message Compose Window (show other bugs)
: Trunk
: x86 Windows XP
: -- normal (vote)
: Thunderbird 24.0
Assigned To: Alfred Peters
:
:
Mentors:
Depends on: 821914
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-20 08:58 PST by Alfred Peters
Modified: 2013-06-25 05:20 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Makes FindServerWithNewsgroup regardless of the collation of the server list (1.12 KB, patch)
2013-04-28 03:00 PDT, Alfred Peters
Pidgeot18: review-
Details | Diff | Splinter Review
Makes FindServerWithNewsgroup regardless of the collation of the server list (929 bytes, patch)
2013-05-05 01:06 PDT, Alfred Peters
Pidgeot18: review+
Details | Diff | Splinter Review

Description Alfred Peters 2013-01-20 08:58:11 PST
User Agent: Mozilla/5.0 (Windows NT 5.1; rv:21.0) Gecko/20130118 Firefox/21.0
Build ID: 20130118213347

Steps to reproduce:

I wrote a new message for an newsgroup. While I edited the NEWSGROUP-header, an autosave-event occurs. The newsgroup name was not written out in full.

The same occurs when I try to save such an Message manually.


Actual results:

I got a error dialog: "Unable to save your message as draft.
Please verify that your Mail & Newsgroups account settings are correct and try again."


Expected results:

1. While editing a NEWSGROUP-header, the autosave should be delayed until the cursor leaves the header.
2. When you save manually, the message should be clear (wrong newsgroup).
Comment 1 Alfred Peters 2013-04-15 10:27:01 PDT
This Bug doesn't occur  in a new profile. So,  more circumstances are necessary to reproduce it :

1. Create a new profile.
2. Create an E-mail account.
{JFTR: The server ID of the account became 'server1'. 'Local folders' got the ID 'Server2'}
3. Create a news account. {=> 'Server3'}
4. Do subscribe to a news group.
5. Open the compose window for a new posting.
6. Type 'garbage' into the newsgroup field.
7. Save article as draft.
   => Works fine!
8. Stop TB.
9. Edit prefs.js. Replace every 'server3' by 'server24' in the whole file.
10. Start TB again and redo Step 5 to 7.
   => Error!

IDs which I've found that generate the Error are 'server8', 'server24' and 'server25'. IDs '3' to '7', '9', '12', '16', '20' to '23' and '25' to '32' are OK!
Comment 2 Hartmut Figge 2013-04-15 11:12:11 PDT
Similar test for SM 2.20a1 Linux x86_64. Without step 2. and therefore replacing 'server2' with 'serverx'.
Values for x without error: 2, 20, 21, 22, 23, 67
Values for x with errors: 8, 24, 87
Other values for x not tested.
Comment 3 Alfred Peters 2013-04-28 02:55:15 PDT
nsNntpService::FindServerWithNewsgroup() searches the first news server witch has the newsgroup subscribed.

Depending on the server-ID changes the sort order of the server list.

If the group can't be found on any server, the return value depends on the server type of the last checked server.

With e.g. server-id 'server9' this is the last server. So the return value is NS_OK (with an empty host string).

With 'server8' it is the first server. In this case the last server isn't a news server and so the return value does indicate an error.
Comment 4 Alfred Peters 2013-04-28 03:00:36 PDT
Created attachment 742799 [details] [diff] [review]
Makes FindServerWithNewsgroup regardless of the collation of the server list

The result of FindServerWithNewsgroup shouldn't depend on the type of a single server and especially not on the sorting order.
Comment 5 Joshua Cranmer [:jcranmer] 2013-05-04 13:25:12 PDT
Comment on attachment 742799 [details] [diff] [review]
Makes FindServerWithNewsgroup regardless of the collation of the server list

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

After reviewing the function in more detail, I think it would be better to replace the return rv; at the end with a return NS_OK; instead.
Comment 6 Alfred Peters 2013-05-05 01:06:58 PDT
Created attachment 745624 [details] [diff] [review]
Makes FindServerWithNewsgroup regardless of the collation of the server list

> After reviewing the function in more detail, I think it would be better to
> replace the return rv; at the end with a return NS_OK; instead.

OK, done.
Comment 7 Ryan VanderMeulen [:RyanVM] 2013-05-28 10:18:01 PDT
https://hg.mozilla.org/comm-central/rev/02731aaa2838

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