Closed Bug 263951 Opened 20 years ago Closed 19 years ago

In <mailCommands.js>, "Error: redeclaration of const NS_BAYESIANFILTER_CONTRACTID"

Categories

(SeaMonkey :: MailNews: Address Book & Contacts, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED
seamonkey1.0alpha

People

(Reporter: timeless, Assigned: standard8)

References

Details

(Keywords: fixed1.8)

Attachments

(2 files, 2 obsolete files)

problem:
Error: redeclaration of const NS_BAYESIANFILTER_CONTRACTID
Source File: chrome://messenger/content/mailCommands.js
Line: 508

reason:
/mailnews/base/search/resources/content/ABSearchDialog.xul, line 42 --
<?xul-overlay href="chrome://messenger/content/mailWindowOverlay.xul"?>
/mailnews/base/search/resources/content/ABSearchDialog.xul, line 76 --
<script src="chrome://messenger/content/mailCommands.js"/>
/mailnews/base/resources/content/mailWindowOverlay.xul, line 61 -- <script
type="application/x-javascript" src="chrome://messenger/content/mailCommands.js"/>
/mailnews/base/resources/content/mailCommands.js, line 519 -- const
NS_BAYESIANFILTER_CONTRACTID =
"@mozilla.org/messenger/filter-plugin;1?name=bayesianfilter";
Status: NEW → ASSIGNED
Attachment #162971 - Flags: superreview?(sspitzer)
Attachment #162971 - Flags: review?(sspitzer)
Comment on attachment 162971 [details] [diff] [review]
Removing erroneous <script .../>

Heard dmose is much more active than sspitzer
Attachment #162971 - Flags: superreview?(sspitzer)
Attachment #162971 - Flags: superreview?(dmose)
Attachment #162971 - Flags: review?(sspitzer)
Attachment #162971 - Flags: review?(dmose)
OS: Windows XP → All
Hardware: PC → All
Whiteboard: [ReviewsPending]
Attached patch Alternative approach (obsolete) — Splinter Review
If you don't need the offline indicator or the (unused) progress meter, then we
can simply remove the entire mail window overlay.
Is there some reason not to apply both of these patches?  If the <script /> is
actually not required, it's just gonna cost time and memeory.
Dan, I am not sure personally, but I think at least one instance of the script
is needed, though keep in mind I am not a mailnews person, nor is it in my main
interest. (just triaging some of Timeless's bugs).  If none of the effects of
that script are used/useful, go ahead and use both, if they are, I personally
suggest removing the overlay, if it does not remove anything useful either.
Good point... you only need strres.js ABSearchDialog.js and abCommon.js
Attachment #162971 - Flags: superreview?(dmose)
Attachment #162971 - Flags: superreview-
Attachment #162971 - Flags: review?(dmose)
Attachment #162971 - Flags: review-
Product: Browser → Seamonkey
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b2) Gecko/20050503] (nightly) (W98SE)

(Moved but still there)
{{
Error: redeclaration of const NS_BAYESIANFILTER_CONTRACTID
Source File: chrome://messenger/content/mailCommands.js
Line: 527
}}
Summary: Error: redeclaration of const NS_BAYESIANFILTER_CONTRACTID → In <mailCommands.js>, "Error: redeclaration of const NS_BAYESIANFILTER_CONTRACTID"
Blocks: 232123
Severity: minor → normal
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.8b2) Gecko/20050701] (nightly) (W98SE)

What is needed to move forward ? (ask for reviews, prepare a third patch, ...)
Whiteboard: [ReviewsPending]
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.7.8) Gecko/20050511] (release) (W98SE)

Bug present in MAS v1.7.x branch too...

{{
Error: redeclaration of const NS_BAYESIANFILTER_CONTRACTID
Source File: chrome://messenger/content/mailCommands.js
Line: 478
}}
I've had a brief discussion with Neil on IRC and we've decided that what we want
for this is something similar to what was done for SearchDialog.xul - see
http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=SearchDialog.xul&branch=&root=/cvsroot&subdir=mozilla/mailnews/base/search/resources/content&command=DIFF_FRAMESET&rev1=1.69&rev2=1.70

Basically - copy the required components of the mailWindowOverlay.xul status bar
(and anything else if there is, I don't believe so) to ABSearchDialog.xul, and
remove the then redundant script statements.

At the moment the required parts of the status bar that I think we need are the
status text and the offline status. I don't know if we want progress indication
 I assume its unused at the moment - we could always put that back in later. The
offline status I think would be worth keeping because of ldap address books.

So, if someone would like to come up with a new patch we'll try and get this
resolved.
Just discussed with Callek, I'll come up with a new patch for this (as per my
previous comments) in the next day or so.
Assignee: bugspam.Callek → bugzilla
Status: ASSIGNED → NEW
QA Contact: addressbook
This patch removes the extra script, and moves the status bar definition
(reduced) from mailWindowOverlay.xul to ABSearchDialog.xul.
Attachment #162971 - Attachment is obsolete: true
Attachment #162996 - Attachment is obsolete: true
Attachment #193067 - Flags: superreview?(neil.parkwaycc.co.uk)
Attachment #193067 - Flags: review?(dmose)
Comment on attachment 193067 [details] [diff] [review]
Combined patch (checked in branch+trunk)

Feel free to kill any of the other scripts if you find that they're unused.
Attachment #193067 - Flags: superreview?(neil.parkwaycc.co.uk) → superreview+
Comment on attachment 193067 [details] [diff] [review]
Combined patch (checked in branch+trunk)

r=dmose.  Would this patch be relevant to Thunderbird also?
Attachment #193067 - Flags: review?(dmose) → review+
(In reply to comment #14)
> (From update of attachment 193067 [details] [diff] [review] [edit])
> r=dmose.  Would this patch be relevant to Thunderbird also?

[Mozilla Thunderbird, version 1.0+ (20050319)] (nightly) (W98SE)

I don't know about the patch, but I don't get this error(s) in TB.
Comment on attachment 193067 [details] [diff] [review]
Combined patch (checked in branch+trunk)

I just checked this in:

/cvsroot/mozilla/mailnews/base/search/resources/content/ABSearchDialog.xul,v 
<--  ABSearchDialog.xul
new revision: 1.16; previous revision: 1.15
Attachment #193067 - Attachment description: Combined patch → Combined patch (checked in)
(In reply to comment #14)
> (From update of attachment 193067 [details] [diff] [review] [edit])
> r=dmose.  Would this patch be relevant to Thunderbird also?

As Serge says, we don't think the bug is there. However a quick look reveals
that we might to remove some of the scripts like we did in this one - I'll check
later & leave this bug open for now to remind me.
Comment on attachment 193067 [details] [diff] [review]
Combined patch (checked in branch+trunk)

Requesting 1.8 branch approval. This is a patch which removes a JS Strict
Error, and adds some cleanup.

SeaMonkey Only, unless my head is lying to me.
Attachment #193067 - Flags: approval1.8b4?
Attachment #193067 - Flags: approval1.8b4? → approval1.8b4+
Comment on attachment 193067 [details] [diff] [review]
Combined patch (checked in branch+trunk)

I've just checked this into the 1.8 branch.
Attachment #193067 - Attachment description: Combined patch (checked in) → Combined patch (checked in branch+trunk)
Keywords: fixed1.8
As I noted in my comments before, Thunderbird doesn't have this bug, however it
does include some unnecessary js files in ABSearchDialog.xul, so this patch
removes them.
Attachment #194051 - Flags: superreview?(bienvenu)
Attachment #194051 - Flags: review?(bienvenu)
Comment on attachment 194051 [details] [diff] [review]
Thunderbird version (checked in)

just make sure that implementing the "Write" command from the search results
doesn't require either of these files.
Attachment #194051 - Flags: superreview?(bienvenu)
Attachment #194051 - Flags: superreview+
Attachment #194051 - Flags: review?(bienvenu)
Attachment #194051 - Flags: review+
(In reply to comment #21)
> (From update of attachment 194051 [details] [diff] [review] [edit])
> just make sure that implementing the "Write" command from the search results
> doesn't require either of these files.

It actually uses AbNewMessage in abCommon.js which gets the compose service and
then starts the compose window from there.

Comment on attachment 194051 [details] [diff] [review]
Thunderbird version (checked in)

I just checked this into trunk.
Attachment #194051 - Attachment description: Thunderbird version → Thunderbird version (checked in)
I'm not going to request approval for the thunderbird verison of the patch for
the branch as its just a script include change, however if you want it David,
feel free to request approval.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
[Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.9a1) Gecko/20050827 SeaMonkey/1.1a]
(nightly) (W98SE)

V.Fixed
Status: RESOLVED → VERIFIED
Target Milestone: --- → Seamonkey1.0alpha
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: