Deleting Account gives incorrect error message "Failed to remove this account."

RESOLVED FIXED

Status

--
minor
RESOLVED FIXED
15 years ago
14 years ago

People

(Reporter: ray, Assigned: sspitzer)

Tracking

({regression})

Trunk
regression

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

15 years ago
Build:2004010408

If an account is deleted, a message box pops up saying that the account deletion
failed.  However, the account is deleted.
(Reporter)

Comment 1

15 years ago
Created attachment 138416 [details]
Screenshot showing Message Box
*** Bug 227188 has been marked as a duplicate of this bug. ***
Changing to All/all since the dupe was on linux and this was on windows
OS: Windows 2000 → All
Hardware: PC → All

Comment 4

15 years ago
*** Bug 227188 has been marked as a duplicate of this bug. ***

Comment 5

15 years ago
*** Bug 228235 has been marked as a duplicate of this bug. ***

Comment 6

15 years ago
The statement accountManager.removeAccount(account);
in accountManager.js always throws an exception.

This works in Mozilla 1.6a. The only change to removeAccount() after the release
of Mozilla 1.6a was made via bug 218825. So I suspect this bug is a regression
caused by bug 218825. What do you think, Neil?
Keywords: regression
Summary: Deleting Account gives incorrect Message Box → Deleting Account gives incorrect error message "Failed to remove account"

Updated

15 years ago
Summary: Deleting Account gives incorrect error message "Failed to remove account" → Deleting Account gives incorrect error message "Failed to remove this account."

Comment 7

15 years ago
The JavaScript Debugger says that when you remove an account its item is removed
from the tree, therefore deselecting it... this means that the account selection
code is triggered when there isn't a selected account... the actual error occurs
on line 716 of AccountManager.js when it tries to compare the old and new value.

There are actually two further errors, the first error is that when you remove
an account, and you had the "main" page selected, the account manager won't load
the main page for any account until you first load one of the other pages; the
second error is that after deleting an account the account manager doesn't
scroll back to the very top.

Comment 8

15 years ago
The account is not completely removed, in the mail folder of your profile, there
is a folder left with the name of the pop adress.
Severity: minor → normal

Comment 9

15 years ago
José: That's Bug 128744. This bug is just about the alert.
Severity: normal → minor

Comment 10

15 years ago
Created attachment 138477 [details] [diff] [review]
Proposed fix.

This fixes the bug by checking if there is currently something selected. If not
onAccountClick() returns early. A call of setSelection(null, null) after the
account removal ensures that onAccountClick() is called again with a valid
selection. Thus the other problems mentioned by Neil disappear, too.

I furthermore removed the workaround for bug 51546, because it's not necessary
anymore (most likely because bug 92366 was fixed) and renamed the variable
result to currentSelection to reflect its purpose.

I would let Seth do the sr to see if he's ok with the removal of the workaround
for bug 51546.

What I still don't really understand is why this worked before...

Updated

15 years ago
Attachment #138477 - Flags: review?(neil.parkwaycc.co.uk)

Comment 11

15 years ago
Created attachment 138486 [details] [diff] [review]
Includes my other two nits

This is just Stefan's patch with a couple of tweaks to fix my other nits.
Attachment #138477 - Attachment is obsolete: true

Updated

15 years ago
Attachment #138486 - Flags: superreview?(bienvenu)
Attachment #138486 - Flags: review?(bienvenu)

Updated

15 years ago
Attachment #138477 - Flags: review?(neil.parkwaycc.co.uk) → review+

Updated

15 years ago
Attachment #138486 - Flags: superreview?(bienvenu)
Attachment #138486 - Flags: superreview+
Attachment #138486 - Flags: review?(bienvenu)
Attachment #138486 - Flags: review+

Comment 12

15 years ago
Checked in by Neil! Thanks for that and the updated patch! Marking FIXED. :-)
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.