Closed Bug 1619157 Opened 4 years ago Closed 4 years ago

Deleting contacts or Mailing lists from "All address books" view in contacts side bar fails with error

Categories

(Thunderbird :: Address Book, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 75.0

People

(Reporter: thomas8, Assigned: darktrojan)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files, 1 obsolete file)

STR

  1. composition with contacts side bar, ensure "All Address Books" is shown
  2. select a contact from "All Address Books" view (contact originates from "Personal AB")
  3. press DEL
  4. repeat same STR for Mailing list from "All Address Books" view (mailing list originates from "Personal AB")

This works in current release version 68.5.0 (32-Bit),
but fails on Trunk 75.0a1 (2020-02-27) (64-bit), so it's a regression.

Alice, would you like to find the regression window? No obligations, just asking if.

Actual result

  • deleting contact from "All ABs" view does nothing, 2 errors in console:
TypeError: can't access property "isMailList", selectedDir is null abCommon.js:429:11
    AbDelete chrome://messenger/content/addressbook/abCommon.js:429
    doCommand chrome://messenger/content/addressbook/abResultsPane.js:519
    goDoCommand chrome://global/content/globalOverlay.js:101
    oncommand chrome://messenger/content/messengercompose/messengercompose.xhtml:1

An error occurred executing the cmd_delete command: [Exception... "[JavaScript Error: "can't access property "isMailList", selectedDir is null" {file: "chrome://messenger/content/addressbook/abCommon.js" line: 429}]'[JavaScript Error: "can't access property "isMailList", selectedDir is null" {file: "chrome://messenger/content/addressbook/abCommon.js" line: 429}]' when calling method: [nsIController::doCommand]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: chrome://global/content/globalOverlay.js :: goDoCommand :: line 101"  data: yes] globalOverlay.js:104
    goDoCommand chrome://global/content/globalOverlay.js:104
    oncommand chrome://messenger/content/messengercompose/messengercompose.xhtml:1
  • deleting a mailing list from "All Abs" view shows confirmation, but confirming does nothing, 2 Errors in console:
TypeError: can't access property "URI", selectedDir is null abCommon.js:495:7

An error occurred executing the cmd_delete command: [Exception... "[JavaScript Error: "can't access property "URI", selectedDir is null" {file: "chrome://messenger/content/addressbook/abCommon.js" line: 495}]'[JavaScript Error: "can't access property "URI", selectedDir is null" {file: "chrome://messenger/content/addressbook/abCommon.js" line: 495}]' when calling method: [nsIController::doCommand]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: chrome://global/content/globalOverlay.js :: goDoCommand :: line 101"  data: yes] globalOverlay.js:104
    goDoCommand chrome://global/content/globalOverlay.js:104
    oncommand chrome://messenger/content/addressbook/abContactsPanel.xhtml:1

Expected:

  • delete selected entries (this bug)
  • select and scroll into view next entry if existing, otherwise last entry (and focus something useful when there's no entry left)
Flags: needinfo?(alice0775)
Severity: minor → normal
Regressed by: 1614265
Assignee: nobody → geoff
Status: NEW → ASSIGNED
Attachment #9130063 - Flags: review?(mkmelin+mozilla)

(In reply to Alice0775 White from comment #1)

REGRESSION WINDOW:
https://hg.mozilla.org/comm-central/pushloghtml?fromchange=306ac4b77c679440f825d487a9147544591db953&tochange=a04956310d2fe4df06c9ba41cb7bb239a09341d4
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=5bfe22b4bd0d64b9d105b66b3ed0fcee10d70e93&tochange=5bfe22b4bd0d64b9d105b66b3ed0fcee10d70e93

Thank you very much Alice, and so fast! You're the best! :-)

Thanks Geoff for picking this up for a fast and easy fix. Maybe this should have a test? I recall that this is not the first time that deletion fails in one corner or another (more so for the special animal of "All address books")...

Flags: needinfo?(geoff)
Comment on attachment 9130063 [details] [diff] [review]
1619157-delete-from-sidebar-1.diff

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

LGTM, r=mkmelin
Attachment #9130063 - Flags: review?(mkmelin+mozilla) → review+

You're right it needs a test. Nothing's a simple as just writing a test though, especially when it comes to figuring out why the test runs in one setup but not others.

Flags: needinfo?(geoff)
Attachment #9130332 - Flags: review?(mkmelin+mozilla)
Keywords: leave-open
Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/8b72e9a9d5c3
Fix error when deleting contacts or mailing lists from contacts side bar. r=mkmelin
Comment on attachment 9130332 [details] [diff] [review]
1619157-delete-from-sidebar-test1.diff

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

I think I'd prefer to keep the imports in each file: It's just more explicit and less magic where it's coming from (even if not too much magic). 
The other parts look good.
Attachment #9130332 - Flags: review?(mkmelin+mozilla) → review+
Attachment #9130332 - Attachment is obsolete: true
Attachment #9131781 - Flags: review+

Pushed by geoff@darktrojan.net:
https://hg.mozilla.org/comm-central/rev/7d7596b594c3
Test deletion of contacts from the composition sidebar. r=mkmelin

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 75.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: