Closed Bug 230108 Opened 21 years ago Closed 21 years ago

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

Categories

(SeaMonkey :: MailNews: Account Configuration, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ray, Assigned: sspitzer)

References

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

Build:2004010408 If an account is deleted, a message box pops up saying that the account deletion failed. However, the account is deleted.
*** 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
*** Bug 227188 has been marked as a duplicate of this bug. ***
*** Bug 228235 has been marked as a duplicate of this bug. ***
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"
Summary: Deleting Account gives incorrect error message "Failed to remove account" → Deleting Account gives incorrect error message "Failed to remove this account."
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.
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
José: That's Bug 128744. This bug is just about the alert.
Severity: normal → minor
Attached patch Proposed fix. (obsolete) — Splinter Review
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...
Attachment #138477 - Flags: review?(neil.parkwaycc.co.uk)
This is just Stefan's patch with a couple of tweaks to fix my other nits.
Attachment #138477 - Attachment is obsolete: true
Attachment #138486 - Flags: superreview?(bienvenu)
Attachment #138486 - Flags: review?(bienvenu)
Attachment #138477 - Flags: review?(neil.parkwaycc.co.uk) → review+
Attachment #138486 - Flags: superreview?(bienvenu)
Attachment #138486 - Flags: superreview+
Attachment #138486 - Flags: review?(bienvenu)
Attachment #138486 - Flags: review+
Checked in by Neil! Thanks for that and the updated patch! Marking FIXED. :-)
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: