Search REsults Preview Error

SharePoint 2016 Search: Sorry, something went wrong – Control_QueryBuilderPreview.js error

Background: Recently I was working on creation of search result sources which were supposed to be used in one of my site collection for search results. But as I typed the query and clicked Test Query button it threw following error on my screen.

Search REsults Preview Error
Figure 1 -Search Results Preview Error

Error: Search display templates are not present on this collection. To add them, you need to activate the “Search Server Web Parts and Templates” feature on the Site Collection Features page.

Correlation ID: 7eeb4b9f-4bda-e0b6-987c-03d72906086b

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.

Template ‘~sitecollection/_catalogs/masterpage/DisplayTemplates/System/Control_QueryBuilderPreview.js’ not found or has syntax errors. (LoadTemplate:)

Cause: Looking at the error from first four lines, it clearly says that Search display templates are not present on this site and “Search Server Web Parts and Template” feature need to be activated. By default this feature is not activated on newly installed sharepoint. And because of which  Control_QueryBuilderPreview.js does not exists.

Resolution:

Activating the “Search Server Webparts and Template” feature.

  1. SharePoint 2016 Management Shell as admin.
  2. Type the command and execute:

Re open “Build Your Query” page and everything should work perfectly!

References:

  1. https://sharepoint.stackexchange.com/questions/70452/query-builder-for-result-source-not-working-in-central-admin
  2. https://vladtalkstech.com/2014/11/search-display-templates-present-site-collection.html

Thanks for reading 

Keep reading, share your thoughts, experiences. Feel free  to contact us to discuss more. If you have any suggestion / feedback / doubt, you are most welcome.

Stay tuned on Knowledge-Junction.

Advertisements

Comments

One comment on “SharePoint 2016 Search: Sorry, something went wrong – Control_QueryBuilderPreview.js error”
  1. kanjuspua says:

    good

Leave a Reply

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