Integrating Search Server Express into WSS 3.0 Team Site.

Just recently we installed Search Server Express for a client on their WSS infrastructure. It’s working quite nicely having a much more granular control than the standard WSS search functions, but my main gripe is the lack of SmallSearchServer control to replace the existing WSS one.

Most users would rather click into a text box at the top of the page, and enter their search query than click off to another search url and perform the action there. So, we need to remove the WSS search input and replace it with our own.

Now, thanks to Microsoft using Delgate controls on the master page, this is nice and simple. All we need is a feature consisting of the standard Feature.Xml and Elements.Xml and the new controltemplate, in this case BSSearchArea.ascx.

So far so good. I’ve customized the existing SearchArea.ascx taken from 12/TEMPLATES/CONTROLTEMPLATES and i’ve removed all mention of the scope. My elements file has been configured to override the existing control using:-

  

And my control is appearing as expected. but my problem now is the error that appears when I enter a search term and click search. I receive:- “This Page has been modified since you opened it. You must open the page again.”

Well I know that the submit button is calling a SharePoint javascript function, so I decided to pull a copy of that out of core.js and put it inline with my ascx after removing anything i don’t want.

So now I’m left with the function called by my form button onClick() event.

function bsSubmitSearchRedirect(strUrl)
{
    var frm=document.forms["frmSiteSearch"];
    if (frm==null)
    {
        if (typeof(MSOWebpartPageFormName) !="undefined")
            frm=document.forms[MSOWebPartPageFormName];
    }
    if (frm !=null)
    {
        var searchText=frm.elements["SearchString"].value;
        strUrl=strUrl+"?k=" + escapeProperly(searchText);
        frm.action=strUrl;
        frm.submit();
    } 
    
}

But I’m still having this errpr when searching.. the weirdest thing about it though, if you click the refresh page link in the error.. it works perfectly..

Watch this space..

2 comments

  1. Hey, this error seems to be related in some circles to the settings for your load balancer on your web farm. We have validated our settings though and everything looks good there. We did just apply a hotfix when we noticed that happened. It only happens once. This is for a My Site when updating their profile. We had never seen this error before.

  2. Unfortunatley I don’t think this was related to a load balancer issue as this was a standalone development server that I was having the problems on.

    In the end I moved the redirect into serverside code. Not quite as effective as it shifts the load impetus onto the server, but it works which is the main thing!!

Leave a Reply

Your email address will not be published.

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.