help.ubuntu.com Unable to do searching

Dougie Richardson ddrichardson at btinternet.com
Sun Dec 21 10:20:05 UTC 2008


On Sun, 21 Dec 2008 01:30:15 +0100
Marko Oreskovic <markoresko at gmail.com> wrote:

> http://help.ubuntu.com
> Does not display search results if Google Javascript is turned off.

Is this the Google script you are discussing?

function() {
	var f = document.getElementById('cse-search-box');
	if (!f) {
		f = document.getElementById('searchbox_demo');
	}
	if (f && f.q) {
		var q = f.q;
		var n = navigator;
		var l = location;
		if (n.platform == 'Win32') {
		q.style.cssText = 'border: 1px solid #7e9db9; padding: 2px;';
		}
		var b = function() {
		if (q.value == '') {
			q.style.background = '#FFFFFF url(http:\x2F\x2Fwww.google.com\x2Fcoop\x2Fintl\x2Fen\x2Fimages\x2Fgoogle_custom_search_watermark.gif) left no-repeat';
		}
	};
	var f = function() {
		q.style.background = '#ffffff';
	};
	q.onfocus = f;
	q.onblur = b;
	if (!/[&?]q=[^&]/.test(l.search)) {
		b();
	}
	}
};


> Users could be expected to enable javascript for *.ubuntu.com
> but since last update of help.ubuntu.com search dos not work
> unless user enables javascript form .google.com

The search is conducted by the above function, so without it enabled it
cannot work - Ubuntu isn't doing the search, Google is.

> Since most of the sites use google scripts it is out of question to
> require users to use google.com javascript because it would have
> negative impact on all user`s experience, security and cpu usage.

Can you qualify this? The script submits nothing not in the user agent
string, except it reports "win32" for some reason I guess we should
address.

Disabling arguably the bet search algorithm available would
have a negative impact on our users.

How is security affected? 

CPU usage? Bandwidth perhaps minimally as there is a call to an
external script inline but not CPU usage - have you data to back
this claim?

> Could old search that was working for many years since last month
> be enabled again, for non-google-javascript users as workaround?

With respect, you are the only person to have mentioned this. Having
followed this for some time, it reads that you have a personal distain
of Google which you haven't quantified.

I don't mean to be negative but there is a strong argument for Google:
1. Developing a search engine is time and resource consuming.
2. Its reinventing a wheel and one that works very well at that.
3. The old search function was inadequate, especially for community
docs.

Merry Christmas,

Dougie

> > Matthew East wrote:
> > On Wed, Dec 17, 2008 at 1:07 PM, Marko Oreskovic
> > <markoresko at gmail.com> wrote:
> >>>> Dustin Kirkland wrote:
> >>> >> I have sent Matt a patch that will display the help.ubuntu.com
> >>> >> header, with search box, consistently with and without
> >>> >> javascript enabled. Hopefully he can apply it soon...
> 
> >> > It seems that non-JavaScript solution still is not working.
> >> > (Not implemented yet)
> > 
> > It is now working for help.ubuntu.com/community (the wiki). Users
> > visiting the wiki without javascript enabled can use the search bar.
> > 
> > This hasn't been rolled out yet to help.ubuntu.com (the static
> > pages) because doing so requires a complete rebuild of the website,
> > which is rather time consuming. I haven't had a lot of time
> > recently.
> > 
> > -- Matthew East http://www.mdke.org gnupg pub 1024D/0E6B06FF 
> 
> 





More information about the ubuntu-doc mailing list