Closed Bug 832760 Opened 11 years ago Closed 11 years ago

NNTP: It fails to save (autosave) a new message while editing the newsgroup-header

Categories

(Thunderbird :: Message Compose Window, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 24.0

People

(Reporter: infofrommozilla, Assigned: infofrommozilla)

References

Details

Attachments

(1 file, 1 obsolete file)

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).
Depends on: 821914
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!
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.
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.
The result of FindServerWithNewsgroup shouldn't depend on the type of a single server and especially not on the sorting order.
Attachment #742799 - Flags: review?(Pidgeot18)
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.
Attachment #742799 - Flags: review?(Pidgeot18) → 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.

OK, done.
Attachment #742799 - Attachment is obsolete: true
Attachment #745624 - Flags: review?(Pidgeot18)
Attachment #745624 - Flags: review?(Pidgeot18) → review+
Keywords: checkin-needed
https://hg.mozilla.org/comm-central/rev/02731aaa2838
Assignee: nobody → infofrommozilla
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 24.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: