Help! My SearchBox Web Part won't Submit

Posted Thursday, February 28, 2008 2:12 PM by CoreyRoth

I have caused this to happen a number of times and the answer isn't obvious at first, so I thought I would post on it and explain what causes it and how to fix it.  The behavior usually occurs for me when I am deploying a SearchBoxEx web part via a feature using an elements.xml file.  What you will see is the web part gets deployed fine, but when you try to submit a query, it doesn't do anything and you get the following JavaScript error.

'options' is null or not an object.

The reason this happens for me is because in my configuration file I am setting the scope dropdown mode to Show, do not include contextual scopes and I have specified a ScopeDisplayGroupName that does not exist yet in my site collection.  Actually any setting for the scope dropdown that displays a dropdown will cause this behavior when the scope display group does not exist.  To fix it quickly, you can either change the scope dropdown mode or create the scope display group on your site collection.  However, the correct way for me to fix this would be to include something in my feature receiver that creates the scope display group.


# Links (2/28/2008) « Steve Pietrek’s SharePoint Stuff

Thursday, February 28, 2008 7:28 PM by Links (2/28/2008) « Steve Pietrek’s SharePoint Stuff

Pingback from  Links (2/28/2008) « Steve Pietrek’s SharePoint Stuff

Leave a Comment