MOSS: Fixing trouble with the Search webpart
Tuesday, 19 August 2008
I’ve talked about the search feature of MOSS before and one of the recent things we’ve been looking at is to include a search box on the main page so users can search the shared folders on the system. There is a handy way of categorising various area so users can search shared drives, MOSS, people, and their own drives separately or perform a combined search. In our scenario, getting the search component to work and provide a useful searching facility in our thin client environment is key to establishing MOSS as a viable platform. I previously talked about configuring the search part in the post MOSS: Configuring Search.
The search on the search tab worked flawlessly but would be more useful as a central part of the main page so the next step is to include a web part on the main page that the user sees:
Once implemented the page is saved and ready to go, so a keyword is entered into the search box and the search button clicked. This is where we run into a little trouble.
Including a search web page on the first page of MOSS returns a "Error on Page." message in Internet Explorer after typing a keyword and clicking on the search button. Nothing happens after that however clicking on the search tab and performing the same action yields the expected results.
Double-clicking on the error message returns a stark warning.
The problem was finally tracked down to the text in the Query box prompt string – the phrase Search the ‘S’ Drive contained the apostrophe symbol:
Removing this symbol resolved the problem. Avoiding the use of the apostrophe symbol in other areas may be a sensible thing to do.

Jason Slater is an independent technologist and blogger.