1

I am using sp2013. I have a search result webpart which I use like a people searcher. It shows all users. And it is possible to search on a specific user. I have cloned the person-item displaytemplate and add 3 fields (phonenumbers).

When I search a litle bit on some users, sometimes it works fine, and sometimes it give me an error:

Display Error: The display template had an error. You can correct it by fixing the template or by changing the display template used in either the Web Part properties or Result Types.

Deze actie wordt niet ondersteund door dit object (OnPostRender: )

When I translate this dutch error it is:

Object doesn't support this action

enter image description here

What is going wrong?

This is my custom part in the display templated:

_#-->


<!--#_                                        
                                                if(has_mobilephone == true ) 
                                                {
_#-->


                                                    <div id="MoreContactInfo"><span id="FieldTitle" class="ms-soften"> Mob. Tel: </span>
                                                    _#= ctx.CurrentItem.MobilePhone =#_
                                                    </div>


<!--#_

}
                                                if(has_workphone == true ) 
                                                {
_#-->


                                                    <div id="MoreContactInfo"><span id="FieldTitle" class="ms-soften"> Werk Tel: </span>
                                                    _#= ctx.CurrentItem.WorkPhone =#_
                                                    </div>


<!--#_

}

                                                if(has_homephone == true ) 
                                                {

_#-->


                                                    <div id="MoreContactInfo"><span id="FieldTitle" class="ms-soften"> Locatie Tel: </span>
                                                    _#= ctx.CurrentItem.HomePhone =#_
                                                    </div>


<!--#_

}


_#-->

In the uls I see these errors. I search on the user "jan":

Microsoft.Office.Server.Search.Query.Ims.ImsQueryInternal : New request: Query text 'jan', Query template '{searchboxquery} contentclass=spspeople'; HiddenConstraints: ; SiteSubscriptionId: 00000000-0000-0000-0000-000000000000

ProductivitySearchFlowExecutor: New request: Query template '{searchboxquery} contentclass=spspeople' transformed to query text 'jan contentclass=spspeople'.

Microsoft.Ceres.SearchCore.Services.Query.AbstractQueryParameters: Query compressed from: 12138 to 1660 bytes.

Microsoft.Ceres.SearchCore.Query.MarsLookupComponent.LookupService.QueryClient.QueryExecutor: ExecuteQuery timings for correlation: 95a5b99c-0d4c-1088-0651-446d20f6d6c4, task dispatch 0 ms, blocked waiting 10 ms, total hits: 0, with dupes: 0, bytes received: 56, 1 tasks: (cell: I.0.0 at IndexComponent1, total task time: 10 ms, query push queue: 0 ms, send to index call duration: 4 ms, total in transit: 6 ms, index node execute queue: 0 ms, query lookup: 4 ms, docsum lookup: 0 ms)

Microsoft.Ceres.SearchCore.Query.MarsLookupComponent.Processing.MarsLookupProducer: Total query time: 12

eventSearchFlowDone: 82774588-a54c-4dae-bfa7-c081e0df9a8a, jan contentclass=spspeople ContentClass=urn:content-class:SPSPeople, Microsoft.PeopleSearchFlow, 24, SPWEBA1.

2

This was the solution. Add this to the masterpage. The sp.js was loaded to late in my situation.

<SharePoint:ScriptLink ID="ScriptLink21" Name="sp.js" runat="server" OnDemand="false" LoadAfterUI="true" Localizable="false" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.