Closed Bug 219534 Opened 21 years ago Closed 21 years ago

javascript: typeof window.sidebar returning 'undefined' instead of 'object'; adding mycroft searchplugins broken

Categories

(Firefox :: General, defect)

defect
Not set
major

Tracking

()

VERIFIED FIXED

People

(Reporter: mozilla, Assigned: mconnor)

References

()

Details

(Keywords: regression)

Attachments

(1 file, 1 obsolete file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030916 Firebird/0.6.1+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.5b) Gecko/20030916 Firebird/0.6.1+

Note: this may be a bug or a change in how window.sidebar is handled and
Mycroft's detection method is now invalid.

Mycroft (mozdev project for search plugins) is displaying the following warning
on my Mozilla Firebird browser:

=====
Warning!

Your browser cannot use search plugins. You need a Mozilla-based browser like
Beonex, Mozilla Seamonkey, Netscape, or Mozilla Firebird. Other Mozilla based
browsers have not yet been tested, please send us some feedback.
=====

Looking at the html code, I see the following code:

=====
<script type="text/javascript">
bo = "<a href=\"http://www.beonex.com/\">Beonex</a>";
mz = "<a href=\"http://www.mozilla.org/releases/stable.html\">Mozilla
Seamonkey</a>";
ns = "<a href=\"http://channels.netscape.com/ns/browsers/\">Netscape</a>";
fb = "<a href=\"http://www.mozilla.org/projects/firebird/releases.html\">Mozilla
Firebird</a>";
oth = "Other Mozilla based browsers have not yet been tested, please send us
some feedback.";
if ((typeof window.sidebar != "object") || (typeof
  window.sidebar.addSearchEngine != "function")) {
  document.write("<h2>Warning!</h2>");
  document.write("<p>Your browser cannot use search plugins. You need a
Mozilla-based browser like "+bo+", "+mz+", "+ns+", or "+fb+". "+oth+"</p>");
}

</script>
=====
Entering 'javascript: typeof window.sidebar' into the location bar returns
'undefined'.  Earlier Firebird builds would return 'object'.

Reproducible: Always

Steps to Reproduce:
1. Visit (http://mycroft.mozdev.org/download.html)



Actual Results:  
The following warning appears:

Warning!

Your browser cannot use search plugins. You need a Mozilla-based browser like
Beonex, Mozilla Seamonkey, Netscape, or Mozilla Firebird. Other Mozilla based
browsers have not yet been tested, please send us some feedback.

Expected Results:  
No warning message displayed.
*** Bug 219799 has been marked as a duplicate of this bug. ***
Confirming. Bug 219799 was filed after this, so it's a dupe. No other bugs found.
I can reproduce this with Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US;
rv:1.5b) Gecko/20030916 Firebird/0.6.1+.
According to the reports on http://mozdev.org/bugs/show_bug.cgi?id=4680 , broken
on linux too. => All/All. Adding "regression" keyword.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: regression
OS: Windows XP → All
Hardware: PC → All
Summary: javascript: typeof window.sidebar returning 'undefined' instead of 'object' → javascript: typeof window.sidebar returning 'undefined' instead of 'object'; adding mycroft searchplugins broken
WORKS:  09/13.
BROKEN: 09/14.
The 1.5/0.7 branch is not affected.
Looks like it's Caillon's checkin for bug 165653:
http://bonsai.mozilla.org/cvsquery.cgi?date=explicit&mindate=09%2F13%2F2003+12%3A54&maxdate=09%2F13%2F2003+12%3A54
SeaMonkey is not affected. Tested with Mozilla/5.0 (Windows; U; Windows NT 5.1;
en-US; rv:1.5b) Gecko/20030916
Severity: normal → major
Yes, I told blake about this on IRC before I even landed the patch.  I don't
have checkin access to firebird so I can't do anything about it.  And since I
can't really do much development for firebird since I can't check in and its a
pain to get patches in unless you do, nor is it the main release distribution
yet, I don't really care, I'm sorry to say.

If someone does, just look at the patch for bug 165653.  It should be obvious as
to how to fix this for firebird.
Keywords: helpwanted
QA Contact: asa
-> me

ported the applicable bits from caillon's patch, rebuilding a current tree with
the changes to test.  If all goes well the patch will be up in about three hours.
Assignee: blake → mpconnor
Attached patch port of patch for bug 165653 (obsolete) — Splinter Review
Comment on attachment 132009 [details] [diff] [review]
port of patch for bug 165653

more fodder for the review queue
Attachment #132009 - Flags: review?(noririty)
Status: NEW → ASSIGNED
Does this really need new reviews?  It already has r and sr.
thanks caillon!
Attachment #132009 - Attachment is obsolete: true
Attachment #132009 - Flags: review?(noririty)
Attachment #132013 - Flags: review?(noririty)
Asa just checked in the firebird patch for this.
Status: ASSIGNED → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Attachment #132013 - Flags: review?(noririty)
Verified fixed 20030928 PC/WinXP
Status: RESOLVED → VERIFIED
Keywords: helpwanted
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: