Search results are not showing - Invalid request

Hi,

I have a publishing site, in which I have enabled the search and the data is crawled.

I created a subsite "Search"

When i add some data in search box, the custom search result page is showing, but no data is shown.

However if I use: http://siteName/_layouts/15/osssearchresults.aspx#k=test , the results are shown.

The same search value is not shown for: http://siteName/search/Pages/results.aspx?k=test , I am getting error as "Invalid request".

Error details:

Exception occured in scope Microsoft.Office.Server.Search.Query.SearchExecutor.ExecuteQueries. Exception=Microsoft.SharePoint.Client.InvalidClientQueryException: Invalid request.   
 at Microsoft.SharePoint.Client.DataConverter.GetObject[T](XmlNode node, ProxyContext proxyContext)   
 at Microsoft.SharePoint.Client.DataConverter.GetObjectArray[T](XmlNode node, ProxyContext proxyContext)   
 at Microsoft.Office.Server.Search.Query.SearchExecutorServerStub.ExecuteQueries_MethodProxy(SearchExecutor target, XmlNodeList xmlargs, ProxyContext proxyContext)   
 at Microsoft.Office.Server.Search.Query.SearchExecutorServerStub.InvokeMethod(Object target, String methodName, XmlNodeList xmlargs, ProxyContext proxyContext, Boolean& isVoid)   
 at Microsoft.SharePoint.Client.ServerStub.InvokeMethodWithMonitoredScope(Object target, String methodName, XmlNodeList args, ProxyContext proxyContext, Boolean& isVoid)

The master page is a custom one and has the following code for search box:

<td class="tdSearch" style="padding-left: 22px;">
<div class="ms-tableCell ms-verticalAlignTop">
<SharePoint:AjaxDelta id="DeltaPlaceHolderSearchArea" BlockElement="true" CssClass="ms-mpSearchBox ms-floatRight" runat="server">
<asp:ContentPlaceHolder id="PlaceHolderSearchArea" runat="server">
<div id="searchInputBox">
<SharePoint:DelegateControl ID="DelegateControl5" runat="server" ControlId="SmallSearchInputBox" />
</div>
</asp:ContentPlaceHolder>
</SharePoint:AjaxDelta>
</div>

</td>

How to fix this?

Thanks


  • Edited by Venkatzeus Tuesday, June 30, 2015 3:00 PM
June 30th, 2015 2:24pm

Hi,

How did you create the custom result page? Could you please provide more details?

Please use IE Developer Tools to inspect this page, and check if it displays some error information.

About how to use IE Developer Tools to view errors and status:

https://msdn.microsoft.com/en-us/library/gg589530(v=vs.85).aspx

Best Regards,

Dean Wang

Free Windows Admin Tool Kit Click here and download it now
July 1st, 2015 8:22am

I agree with the poster above. It's most likely an issue with the way the page was built.
July 1st, 2015 1:07pm

Hi,

Thanks for the reply.

I am getting a javascript error in the result page from Master page.

In the master page, i have the code, which sets the text to "Search" initially:

$(document).ready(function () {
               document.getElementById("SearchBox").children[0].children[0].value = "SEARCH";
               document.getElementById("SearchBox").children[0].children[0].title = "SEARCH";
           });

I am getting the error as "SCRIPT5007: Unable to get value of the property 'children': object is null or undefined". I am using IE 9.

In the master page i have used :

<meta http-equiv="X-UA-Compatible" content="IE=10"/>

How to fix this?

Thanks

Free Windows Admin Tool Kit Click here and download it now
July 2nd, 2015 12:58pm

Hi,

I have tested your code you provided in IE 9 and it worked fine.

Please debug your code and confirm whether the children object exists.

Thanks,

Dean Wang

July 7th, 2015 2:42am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics