New → "Mailing List" always disabled / kAllDirectoryRoot is not defined

RESOLVED FIXED in seamonkey2.39

Status

SeaMonkey
MailNews: Address Book & Contacts
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: Karsten Düsterloh, Assigned: Karsten Düsterloh)

Tracking

Trunk
seamonkey2.39

SeaMonkey Tracking Flags

(seamonkey2.39 fixed)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

3 years ago
Created attachment 8592488 [details] [diff] [review]
patch

Open the address book. Look at the Error Console:

Error: ReferenceError: kAllDirectoryRoot is not defined
Source File: chrome://messenger/content/addressbook/abResultsPane.js
Line: 423

Error: An error occurred updating the cmd_newlist command: [Exception... "[JavaScript Error: "kAllDirectoryRoot is not defined" {file: "chrome://messenger/content/addressbook/abResultsPane.js" line: 423}]'[JavaScript Error: "kAllDirectoryRoot is not defined" {file: "chrome://messenger/content/addressbook/abResultsPane.js" line: 423}]' when calling method: [nsIController::isCommandEnabled]"  nsresult: "0x80570021 (NS_ERROR_XPC_JAVASCRIPT_ERROR_WITH_DETAILS)"  location: "JS frame :: chrome://global/content/globalOverlay.js :: goUpdateCommand :: line 80"  data: yes]
Source File: chrome://global/content/globalOverlay.js
Line: 85

Select eg. the personal addressbook. Open File → New and find that "Mailing List" is disabled although it shouldn't be in this case.
Attachment #8592488 - Flags: review?(iann_bugzilla)
(Assignee)

Updated

3 years ago
Assignee: nobody → mnyromyr

Comment 1

3 years ago
Comment on attachment 8592488 [details] [diff] [review]
patch

As TB define this in their abCommon.js should we too instead of here?
Flags: needinfo?(mnyromyr)

Comment 2

3 years ago
(In reply to Ian Neal from comment #1)

> As TB define this in their abCommon.js should we too instead of here?
Actually it's defined in two places, three if you count nsIAbDirectory.idl

* Perhaps kAllDirectoryRoot in nsIAbDirectory.idl should be exposed to JS callers 
http://mxr.mozilla.org/comm-central/source/mailnews/addrbook/public/nsIAbDirectory.idl?rev=84ac3c711098&mark=13-18#13
Then you can do something like:
constg kAllDirectoryRoot = Components.interfaces.nsIAbDirectory.kAllDirectoryRoot;

* The whole of Bug 170270 should be ported not just a constant.
(Assignee)

Comment 3

3 years ago
Created attachment 8594220 [details] [diff] [review]
v2 with button wiring [Checked in: Comment 9]

(In reply to Philip Chee from comment #2)
> * Perhaps kAllDirectoryRoot in nsIAbDirectory.idl should be exposed to JS
> callers 
> http://mxr.mozilla.org/comm-central/source/mailnews/addrbook/public/
> nsIAbDirectory.idl?rev=84ac3c711098&mark=13-18#13
> Then you can do something like:
> constg kAllDirectoryRoot =
> Components.interfaces.nsIAbDirectory.kAllDirectoryRoot;

That'd probably be best.

> * The whole of Bug 170270 should be ported not just a constant.

The intention of this bug here was "just" to fix the menu.
On a second look, the New list is also kind of affected, because it doesn't even listen to the controller, so might just fix that here as well.
Anything else is out of scope here, I'd say.
Attachment #8592488 - Attachment is obsolete: true
Attachment #8592488 - Flags: review?(iann_bugzilla)
Flags: needinfo?(mnyromyr)
Attachment #8594220 - Flags: review?(iann_bugzilla)

Comment 4

3 years ago
Comment on attachment 8594220 [details] [diff] [review]
v2 with button wiring [Checked in: Comment 9]

r=me
Will "Perhaps kAllDirectoryRoot in nsIAbDirectory.idl should be exposed to JS callers" be in a follow-up bug, if so, could you create it / reference it?
Flags: needinfo?(mnyromyr)
Attachment #8594220 - Flags: review?(iann_bugzilla) → review+

Updated

3 years ago
Status: NEW → ASSIGNED

Updated

3 years ago
Keywords: checkin-needed
(Assignee)

Comment 5

3 years ago
(In reply to Ian Neal from comment #4)
> Comment on attachment 8594220 [details] [diff] [review]
> v2 with button wiring
> 
> r=me
> Will "Perhaps kAllDirectoryRoot in nsIAbDirectory.idl should be exposed to
> JS callers" be in a follow-up bug, if so, could you create it / reference it?

Will do (after Pentecost).
This might be related to TB Bug 1143812, probably caused by Bug 170270.
Blocks: 170270
See Also: → bug 1143812

Comment 7

3 years ago
(In reply to Karsten Düsterloh from comment #5)
> > Will "Perhaps kAllDirectoryRoot in nsIAbDirectory.idl should be exposed to
> > JS callers" be in a follow-up bug, if so, could you create it / reference it?
> 
> Will do (after Pentecost).
Yes please.

But hopefully bug 1153840 will clean this up a bit and remove the need of various places to manage the All ABs menuitem and know the kAllDirectoryRoot.
(Assignee)

Comment 8

3 years ago
Filed bug bug 1176084 - kAllDirectoryRoot (etc.) in nsIAbDirectory.idl should be exposed to JS callers.
Flags: needinfo?(mnyromyr)

Comment 9

3 years ago
Comment on attachment 8594220 [details] [diff] [review]
v2 with button wiring [Checked in: Comment 9]

https://hg.mozilla.org/comm-central/rev/390e5df881b2
With a=me for the CLOSED TREE
Attachment #8594220 - Attachment description: v2 with button wiring → v2 with button wiring [Checked in: Comment 9]

Comment 10

3 years ago
Is this needed for any other branches?
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox40: affected → ---
status-seamonkey2.39: --- → fixed
Flags: needinfo?(mnyromyr)
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → seamonkey2.39

Comment 11

2 years ago
> Is this needed for any other branches?
Not any more.
Flags: needinfo?(mnyromyr)
You need to log in before you can comment on or make changes to this bug.