We have a third-party SharePoint app and the search doesn't seem to be working in just the application. The search does work in the Site collection default search and also in the App Catalog site where the app is installed.It shows an error that
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_SearchBox.js' not found or has syntax errors. (LoadTemplate: )
As per our observation, the page is looking for the files inside the app. For instance, the page is trying to look for search js file in the below mentioned URL http://app-0125819d627489.devapps2.abc.com:16235/_catalogs/masterpage/display templates/search/control_searchresults.js
whereas actually the js file is located in the site collection level in the below mentioned URL http://searchsite:16235/_catalogs/masterpage/display/templates/search/control_searchresults.js
We have activated the feature and all the features related to the Search are active. All the files related to search are present in the path http://searchsite:16235/_catalogs/masterpage/display templates/search
Can somebody please help us with the solution.