2

recently when we use "search this site" searchbox this Error displayed:

"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/Display Templates/Search/Control_SearchResults.js' not found or has syntax errors. (LoadTemplate: )"

I've search and find some solution that need change or recovery in "Display Templates" folder but when I use sharepoint designer, there is no such folder in "All_filles/_catalogs/masterpages/"! however when i search in server i can find this folder in "C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\FEATURES\SearchWebParts\DisplayTemplates" that contain "Control_SearchResults.js".

how can I solve this problem?

Thanks

  • I'm having the same issue with a brand new install of SP 2016. Is that the version you are using? Did you try to enable the site collection feature "Search Server Web Parts and Templates" via UI or Powershell? – Toadmyster Apr 12 '17 at 5:57
  • @Toadmyster No, I'm using SP 2013. I've checked site collection features, and "Search Server Web Parts and Templates" is enabled. I couldn't remember when and how i activated it, but it is now activated. did you think it is related to our problems ? – Behnam Heydari Apr 12 '17 at 18:20
  • It must be at least part of the issue. I didn't even have a Display Templates folder until I ran the powershell command Enable-SPFeature SearchWebParts -url myserver -force (activating the feature from the UI didn't work). There must be another feature that needs to be turned on. – Toadmyster Apr 12 '17 at 21:24
  • I finally gave up and just copied the files from another farm. We did another install of SP 2016 and all of the files were there from the get-go. Weird. – Toadmyster Jul 8 '17 at 4:01

Your Answer

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

Browse other questions tagged or ask your own question.