Closed Bug 225490 Opened 21 years ago Closed 21 years ago

netscape search plugin (mozilla's default) is no longer functioning. search is broken

Categories

(SeaMonkey :: Search, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: asa, Unassigned)

References

Details

(Keywords: regression, smoketest)

Attachments

(6 obsolete files)

Mozilla's search feature defaults to Netscape's search engine which no longer
functions. This smoketest failure needs to be fixed, preferably by switching the
default search engine to Google. 

The URLbar search, the sidebar search, and the context menu search items all
fail to return results. 

Workaround: switch to a different search engine.
Flags: blocking1.6b+
Flags: blocking1.4.2?
*** Bug 225561 has been marked as a duplicate of this bug. ***
Keywords: regression
*** Bug 225646 has been marked as a duplicate of this bug. ***
Since Netscape search uses Google, maybe remove Netscape search completely?
Attachment #136019 - Flags: review?(caillon)
what is jeezes.src? Is that supposed to be jeeves? can you also help out with
the work I wasn't able to complete at bug 213822 (removing developer search
engines, making google the default, and make it not break people that had
previously created profiles with other defaults?
Comment on attachment 136019 [details] [diff] [review]
(Av1) <NetscapeSearch.*> code removal
[Check in: See Av2]

>Index: mozilla/profile/defaults/search.rdf
>===================================================================
>RCS file: /cvsroot/./mozilla/profile/defaults/search.rdf,v
>retrieving revision 1.7
>diff -up -r1.7 mozilla/profile/defaults/search.rdf
>--- mozilla/profile/defaults/search.rdf
>+++ mozilla/profile/defaults/search.rdf
>@@ -53,9 +53,9 @@
> 
> 
>   <RDF:Seq about="NC:SearchCategory?category=urn:search:category:1">
>-  	<RDF:li resource="NC:SearchCategory?engine=urn:search:engine:NetscapeSearch.src" />
>     <RDF:li resource="NC:SearchCategory?engine=urn:search:engine:google.src" />
>-  	<RDF:li resource="NC:SearchCategory?engine=urn:search:engine:dmoz.src" />
>+    <RDF:li resource="NC:SearchCategory?engine=urn:search:engine:dmoz.src" />
>+    <RDF:li resource="NC:SearchCategory?engine=urn:search:engine:jeezes.src" />

jeeves.src ?

>   </RDF:Seq>
> 
>   <RDF:Seq about="NC:SearchCategory?category=urn:search:category:2">
>File mozilla/xpfe/components/search/datasets/NetscapeSearch.gif should be removed!
>File mozilla/xpfe/components/search/datasets/NetscapeSearch.src should be removed!
>Index: mozilla/xpfe/components/search/datasets/Makefile.in
>===================================================================
>RCS file: /cvsroot/./mozilla/xpfe/components/search/datasets/Makefile.in,v
>retrieving revision 1.31
>diff -up -r1.31 mozilla/xpfe/components/search/datasets/Makefile.in
>--- mozilla/xpfe/components/search/datasets/Makefile.in
>+++ mozilla/xpfe/components/search/datasets/Makefile.in
>@@ -43,8 +43,6 @@ FILES		= \
> 	lxrmozilla.src      \
> 	mozilla.gif         \
> 	mozilla.src         \
>-	NetscapeSearch.gif  \
>-	NetscapeSearch.src  \

I assume you're going to cvs remove these as well.

> 	$(NULL)
> endif
> 
>Index: mozilla/xpfe/components/search/resources/search-panel.js
>===================================================================
>RCS file: /cvsroot/./mozilla/xpfe/components/search/resources/search-panel.js,v
>retrieving revision 1.79
>diff -up -r1.79 mozilla/xpfe/components/search/resources/search-panel.js
>--- mozilla/xpfe/components/search/resources/search-panel.js
>+++ mozilla/xpfe/components/search/resources/search-panel.js
>@@ -717,7 +717,7 @@ function onNavWindowLoad() {
>         for (var i = 0; i < engineBox.childNodes.length; ++i) {
>           itemNode = engineBox.childNodes[i];
>           var theID = itemNode.id;
>-          if (theID.indexOf("NetscapeSearch.src") != -1) {
>+          if (theID.indexOf("google.src") != -1) {

It would be nice to have some way to better account for updates in the future,
but ok for now.

r=caillon
Attachment #136019 - Flags: review?(caillon) → review+
Ben, can you super-review this so we can get it in for Beta (it needs to land
today, if at all possible).
*** Bug 213822 has been marked as a duplicate of this bug. ***
See also bug 212207 for problems in the mozilla.src, bugzilla.src etc.
Comment on attachment 136019 [details] [diff] [review]
(Av1) <NetscapeSearch.*> code removal
[Check in: See Av2]

sr=alecf 
lets ship this thing!
Attachment #136019 - Flags: superreview+
Comment on attachment 136019 [details] [diff] [review]
(Av1) <NetscapeSearch.*> code removal
[Check in: See Av2]


Adding 'approval1.6b=?';
but reminding the issues (like comment 6) were not answered yet...
Attachment #136019 - Flags: approval1.6b?
Comment on attachment 136019 [details] [diff] [review]
(Av1) <NetscapeSearch.*> code removal
[Check in: See Av2]

a=tor for 1.6b, but make sure the issues from comment 6 are addressed.
Attachment #136019 - Flags: approval1.6b? → approval1.6b+
Attachment #136019 - Attachment description: remove it → <NetscapeSearch.*> code removal patch v1
This really is patch v1 file,
plus a single character update: 'z' -> 'v'.

I suggest that someone check it in asap;

and leave the bug open until an additional 'file removal' patch is checked in
too. (or is this plain cvs commands ?)
(I don't know how to do this either way !)
Attachment #136019 - Attachment is obsolete: true
Comment on attachment 136812 [details] [diff] [review]
(Av2) <NetscapeSearch.*> code removal
[Checked in: Comment 15]


'r=?': (see comment 13)
Attachment #136812 - Flags: review?(caillon)
Checked in for timeless, as he's on vacation.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Attachment #136019 - Attachment description: <NetscapeSearch.*> code removal patch v1 → <NetscapeSearch.*> code removal patch v1 [Check in: See v2]
Comment on attachment 136019 [details] [diff] [review]
(Av1) <NetscapeSearch.*> code removal
[Check in: See Av2]


'blocking1.4.2=?' still remains on bug:
adding 'approval1.4.2=?' on patch...

(Note that I have no opinion on this.)
Attachment #136019 - Flags: approval1.4.2?
Attachment #136812 - Attachment description: <NetscapeSearch.*> code removal patch v2 → <NetscapeSearch.*> code removal patch v2 [Checked in: Comment 15]
Attachment #136812 - Flags: review?(caillon)
THis doesn't fix the problem. Testing the latest windows build with a new
profile, I have no search engine selected in the addressbar popup and the
context menu search does nothing. When I examine preferences, I see that
Bugzilla is listed as my search engine. Changing that to google fixes the
addressbar popup and the contextmenu search. 
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Flags: blocking1.6b+ → blocking1.6+
http://lxr.mozilla.org/seamonkey/source/modules/libpref/src/init/all.js#44
still says:
pref("network.search.url","http://cgi.netscape.com/cgi-bin/url_search.cgi?search=");

I might be mistaken, but isn't this file used for defaults in new profiles?
Ok, sorry for spamming; this line seems to serve no (or a different) purpose: it
is the same in my regular profile although I use google for urlbar search.
Attachment #136019 - Attachment description: <NetscapeSearch.*> code removal patch v1 [Check in: See v2] → (Av1) <NetscapeSearch.*> code removal [Check in: See Av2]
Attachment #136812 - Attachment description: <NetscapeSearch.*> code removal patch v2 [Checked in: Comment 15] → (Av2) <NetscapeSearch.*> code removal [Checked in: Comment 15]
This time more useful info:
with new profile there is initially no search engine available when you type (as
Asa already pointed out) - there is only a small horizontal strip where a line
should offer searching for the typed word in a search engine.


When you begin typing, JS console shows:

Error: [Exception... "Component returned failure code: 0x8000ffff
(NS_ERROR_UNEXPECTED) [nsIPrefBranch.getComplexValue]"  nsresult: "0x8000ffff
(NS_ERROR_UNEXPECTED)"  location: "JS frame ::
chrome://navigator/content/urlbarBindings.xml :: updateEngines :: line 222" 
data: no]
Source File: chrome://navigator/content/urlbarBindings.xml
Line: 222

Observation in the prefs (about:config):
Initially (new profile) browser.search.defaultengine is not existent.
When you go to the "Internet Search" prefs and click "Ok" _without_ having
actively selected an engine, this pref becomes existent, BUT its value is empty
and there is still no search possible.
When you finally choose Google, searching gets possible and the pref gets a
value like
engine://D%3A%5CDesktop%5Cmozilla-i586-pc-msvc%5Cmozilla%5Csearchplugins%5Cgoogle.src
(yes, a folder on my Desktop is where the current mozilla version resides). 

When I do the same (create a new profile) with Moz 1.5, this pref is already
existent from the very beginning and its value is analogous to the one above -
just that it is NetscapeSearch.src now...
Based on comment 19, and a few string searchs with LXR.
Comment on attachment 137142 [details] [diff] [review]
(Bv1) <all.js> unused 'network.search.url' pref. removal


'r=?': (see comment 21)
Can you (super-)review, check it in ?
Attachment #137142 - Flags: superreview?(alecf)
Attachment #137142 - Flags: review?(caillon)
Attachment #136812 - Attachment is obsolete: true
I think I found the main problem:
browser.search.defaultenginename (attention: "...NAME", not the same pref as
talked about before!) is "Netscape Search" after profile creation.

When browser.search.defaultenginename is changed to "Google" right after profile
creation, before first Mozilla startup, Google seems to be selected correctly as
default search engine and everything works.

It seems that
http://lxr.mozilla.org/seamonkey/source/xpfe/communicator/resources/locale/en-US/region.properties#4
sets this wrong value ("Netscape Search").
[This happens via /modules/libpref/src/init/all.js, line 248 --
pref("browser.search.defaultenginename",
"chrome://communicator-region/locale/region.properties");]

So maybe just changing that line might solve the problem.
[Not sure at the moment if the line
defaultSearchURL=http://search.netscape.com/cgi-bin/search?charset=UTF-8&search=
- also defined there -  has to be changed: it works without doing so.]

Currently I cannot build, so I can only report back in at least a few hours.
LXR string search result:
{
search\.netscape\.com

/build/package/rpm/SOURCES/mozilla-redhat-home-page.patch, line 17 --
browser.search.defaulturl=http://search.netscape.com/cgi-bin/search?search=

/embedding/browser/activex/src/common/IWebBrowserImpl.h, line 199 -- CComBSTR
bstrUrl(L"http://search.netscape.com/");

/xpfe/browser/resources/locale/en-US/region.properties, line 9 --
fallbackDefaultSearchURL=http://search.netscape.com/cgi-bin/search?charset=UTF-8&search=

/xpfe/browser/resources/locale/en-US/region.properties, line 16 --
browser.search.defaulturl=http://search.netscape.com/cgi-bin/search?search=

/xpfe/communicator/resources/locale/en-US/region.properties, line 3 --
defaultSearchURL=http://search.netscape.com/cgi-bin/search?charset=UTF-8&search=
}
See bug 212207 comments 5 and 6 for some additional issues.
This is a minimum patch for changing default search (especially for new
profiles) to Google. 
It does not address the issues with 404 at mozilla.org search and missing
sidebar results for bugzilla search (both mentioned in bug 212207), but only
fixes the problems resulting from removing the Netscape Search (as Asa pointed
out in comment #17).

Keeping this patch so simple should make it easy for it to make it into 1.6
final.

Mainly it fixes what I observed in comment #23, plus changes default fallback
search engine to Google (which is also able to provide sidebar results).
I'll test it with old and new profiles and request reviews afterwards.


Patch details:
"ensureDefaultEnginePrefs" is used to ensure that there is really a serch
engine available. For doing so it searches "search.rdf" for a search engine
with the name given in the pref "browser.search.defaultenginename".
As suspected in comment #23 this pref is still "Netscape Search", but the
corresponding entries have been removed from "search.rdf" with the earlier
patch to this bug.
So we end up without a search engine.
By changing that pref to "Google" an entry is found and therefore the existence
of a default fallback search engine is guaranteed.
There was still one occurrence of netscape search left in default prefs.
With this patch mozilla is free from references to "search.netscape.com" except
for two places mentioned in comment #24: one is redhat-specific, one is in
"activex" - and I won't touch them.
Attachment #137157 - Attachment is obsolete: true
need to get reviews on this quickly and get it in, if it is going to make th4e
1.6 train...  who can review?
Comment on attachment 137159 [details] [diff] [review]
(Cv2) change default search engine to Google (more complete)

Ok, I tested my patch with new profiles, with profiles from older Mozilla
versions, etc. and it seems to be ok (it only replaces 404 URLs, so there is
not much it can regress anyway).
=> requesting review from caillon and alecf who did the reviews for the
original patch.

When testing, you might stumble across a problem with the wrong search engine
displayed in the prefs. But this is not the fault of my patch, but appears when
switching app directories and is caused by Mozilla not storing the search
plugins in the profile directory. It's explained e.g. in bug 212207 comment #11
and #12 (and others as well) and bug 205708 comment #16.

The "regular" thing (update Mozilla from older version in the same directory)
does work, though.
Attachment #137159 - Flags: superreview?(alecf)
Attachment #137159 - Flags: review?(caillon)
Attachment #137159 - Flags: review?(caillon) → review+
Comment on attachment 137159 [details] [diff] [review]
(Cv2) change default search engine to Google (more complete)

>Index: xpfe/browser/resources/locale/en-US/region.properties
>===================================================================
>RCS file: /cvsroot/mozilla/xpfe/browser/resources/locale/en-US/region.properties,v
>retrieving revision 1.8
>diff -u -r1.8 region.properties
>--- xpfe/browser/resources/locale/en-US/region.properties	25 Aug 2003 23:03:59 -0000	1.8
>+++ xpfe/browser/resources/locale/en-US/region.properties	9 Dec 2003 23:26:33 -0000
>@@ -6,14 +6,14 @@
> keywordList=http://home.netscape.com/escapes/keywords
> webmailKeyword=http://webmail.netscape.com
> careerKeyword=keyword:[Your city] careers
>-fallbackDefaultSearchURL=http://search.netscape.com/cgi-bin/search?charset=UTF-8&search=
>+fallbackDefaultSearchURL=http://www.google.com/search?q=
> otherSearchURL=http://home.netscape.com/bookmark/6_0/tsearch.html

Can't we do something about otherSearchURL as well?
Of course we can.
It is only used in:
http://lxr.mozilla.org/seamonkey/source/xpfe/browser/resources/content/navigator.js#1105
as a fallback search URL if everything else fails.
It is not used to execute a search, but to point the browser to a place, where
the user himself can do a search.

The given URL still works (although redirected) and I wanted to avoid any
(possibly "political") discussion about where to point the browser in this case
to make the patch go in quickly.

But if you want me to make a patch with this also pointing to Google (just its
homepage), I'd gladly do it.
I'd rather we be consistent across the board as to where we are defaulting to
pointing people.  If we google here, let's also go google there.
As requested by caillon on IRC this patch does what my previous one did 
_and_ changes "otherSearchURL" (fallback URL for fallback URL or something like
that, probably never used) from Netscape Search page to Google home page 
_and_ removes the unused pref "network.search.url" (as patch Bv1 already did).
Attachment #137142 - Attachment is obsolete: true
Attachment #137159 - Attachment is obsolete: true
Comment on attachment 137208 [details] [diff] [review]
(Dv1) All-in-one (=B+C++): change default to Google plus remove unused pref [Checked in: Comment 42]

sr=ben@mozilla.org
Attachment #137208 - Flags: superreview+
Comment on attachment 137159 [details] [diff] [review]
(Cv2) change default search engine to Google (more complete)

removing obsolete request
Attachment #137159 - Flags: superreview?(alecf)
Comment on attachment 137208 [details] [diff] [review]
(Dv1) All-in-one (=B+C++): change default to Google plus remove unused pref [Checked in: Comment 42]

To make sure that the removed pref is really unused, I did (in addition to
Serges searches):
- make sure "network.search" and "search.url" don't exist in the source (at
least not in this context)
- check any occurrence of "pref" (any case) in nsInternetSearchService.cpp
- regexp search for "Pref(.*url\"" and "Value(.*url\"" in the fresh source tree
on my harddisk
- am in the process of testing a newly build Mozilla with this

requesting r= from caillon
Attachment #137208 - Flags: review?(caillon)
Comment on attachment 137142 [details] [diff] [review]
(Bv1) <all.js> unused 'network.search.url' pref. removal

removing obsolete review requests
Attachment #137142 - Flags: superreview?(alecf)
Attachment #137142 - Flags: review?(caillon)
(As an aside note: Google search does include the URL parameter
"sourceid=mozilla-search", it can be seen in google.src. The plain Google search
URLs in the patch do _not_ prevent Mozilla from sending this parameter. 
Actually they are virtually never used and only there for some case of error.
The search URL that _is_ used is fetched from google.src after finding the
engine name "Google" in search.rdf.)

(One more note: "network.search.url" has been in all.js since Netscape released
the code to public and was never touched since then. So it might be a relict
from very old times...)
Attachment #137208 - Flags: review?(caillon) → review+
Comment on attachment 137208 [details] [diff] [review]
(Dv1) All-in-one (=B+C++): change default to Google plus remove unused pref [Checked in: Comment 42]

requesting approval1.6? for this simple batch for a 1.6 blocker
Attachment #137208 - Flags: approval1.6?
Comment on attachment 137208 [details] [diff] [review]
(Dv1) All-in-one (=B+C++): change default to Google plus remove unused pref [Checked in: Comment 42]

a=asa (on behalf of drivers) for checkin to Mozilla 1.6
Attachment #137208 - Flags: approval1.6? → approval1.6+
Comment on attachment 136019 [details] [diff] [review]
(Av1) <NetscapeSearch.*> code removal
[Check in: See Av2]

unsetting obsolete request
Attachment #136019 - Flags: approval1.4.2?
I see two more possible things to do:
- Timeless, was it intended, that you added Jeeves to search.rdf, but did not
add jeeves.src/gif to Makefile.in? 
- Does anybody want this on the 1.4 branch? Wherever you want to include this,
be careful: patch Av2 _and_ Dv1 (attachments 136812, 137208) are needed, because
they complement each other.

Otherwise, this bug is fixed, no? Any reason to leave it open?
Attachment #137208 - Attachment description: (Dv1) All-in-one: change default to Google plus remove unused pref → (Dv1) All-in-one: change default to Google plus remove unused pref [Checked in: Comment 42]
BTW: keyword search (you have to enable it in the prefs) still uses
keywords.netscape.com (it's a pref) which redirects to search.netscape.com.
But that's bug 53171 or bug 76547.
Flags: blocking1.4.2? → blocking1.4.2-
This bug can be resolved as fixed and if someone would like to request that
those patches land on the 1.4 branch, the approvals should be requested on the
Resolved as Fixed bug.
-> FIXED
Status: REOPENED → RESOLVED
Closed: 21 years ago21 years ago
Resolution: --- → FIXED
The missing makefile entries for AskJeeves I mentioned in comment #43 are
tracked in bug 228620.
Is it just me, or the otherSearchURL should be ending with a slash?
Could this have caused bug 229929? I'm guessing that the user had Netscape
Search as his default, which got deleted, thus causing confusion...
Without having looked at it in detail I would say yes. This is probably expected
to happen after the first patch (Av2) - that I was not involved with, I might
add ;-) - was checked in.
Attachment #137208 - Attachment description: (Dv1) All-in-one: change default to Google plus remove unused pref [Checked in: Comment 42] → (Dv1) All-in-one (=B+C++): change default to Google plus remove unused pref [Checked in: Comment 42]
Attachment #137208 - Attachment is obsolete: true
Depends on: 128081
So this fixed the "Tools | Search the Web" settings as well right? (I was
working on trying to isolate that and file a bug). Thanks!

As for the keyword.URL bugs, this was fixed in bug 119825.

The bugs mentioned in comment #44 are actually bugs on the feature
implementation, not on the actual default pref value.

I can confirm that this is fixed in 20040111, Mac OS X. I did see one problem
where my current profile needed the preference set before the default search
engine actually came up (google), the first usage of search pulled up the old
engine I had selected (lxr). From reading the bug comments, I think this was
some expected, one-time strangeness.
Product: Core → SeaMonkey
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: