+1-888-365-2779
Try Now
More in this section

Forums / Set-up & Installation / Error on adding Search Results control

Error on adding Search Results control

11 posts, 0 answered
  1. Andrew Browne
    Andrew Browne avatar
    4 posts
    Registered:
    11 Apr 2006
    10 Nov 2007
    Link to this post
    Hi,

    When I add the search results control to a page it get the following error:

    A required control was not found in the template for "Telerik.Search.WebControls.SearchResult+Container". The control must be assignable form type "System.Web.UI.Control" and must have ID "rptResults".

    I am using Sitefinity 3.1 with SP1 added.

    cheers
    Andrew Browne


  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    12 Nov 2007
    Link to this post
    Hi Andrew,

    Could you reproduce the problem after applying SiteFinity_3_1_SP1_dev_patch_1458.zip patch? If yes, please give us more details to figure out what is wrong (steps to reproduce, property settings of SearchResult control).

    For example, the reason for this exception could be that a control with ID
    "rptResults" is missing in the SearchResult template located in ~/Sitefinity/ControlTemplates/Search/ folder. You could check if you have a repeater with this ID in the corresponding template. Another possible reason for this behavior could be that it cannot find the necessary template and it tries to load the default one that has no implementation.

    Thanks for your cooperation in advance.


    Best wishes,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Andrew Browne
    Andrew Browne avatar
    4 posts
    Registered:
    11 Apr 2006
    14 Nov 2007
    Link to this post
    Thanks Pepi,

    I have applied the 1458 patch but the problem is still there.

    The error comes up when I add the control to a page so I do not have any opportunity to modify the properties.  The error takes up the whole page (ie. an unhandled exception not one that is caught and reported where the control should be).

    cheers
    Andrew
  4. Andrew Browne
    Andrew Browne avatar
    4 posts
    Registered:
    11 Apr 2006
    14 Nov 2007
    Link to this post
    Also I have double checked that the SearchResults template exists in ~/Sitefinity/ControlTemplates/Search/ and has not been modified.  It contains the "rptResults" repeater.
  5. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    14 Nov 2007
    Link to this post
    Hello Andrew,

    Did you follow the instructions for applying the patch? Please, check once again if everything is properly set. The Upgrade Instructions could be found on the following link. It is very important to change the application web.config file - defaultProvider name in the telerik/search configuration section should be changed from "Sitefinity" to "Search". The whole section should look like this:

    <search defaultProvider="Search"
       <providers> 
        <clear/> 
        <add name="Search" type="Telerik.Search.Data.DefaultProvider, Telerik.Search.Data"  connectionStringName="DefaultConnection"/> 
       </providers> 
       <indexingClients> 
        <add name="PageIndex" type="Telerik.Cms.Web.PageIndexingClient, Telerik.Cms" settingsControl="Telerik.Cms.Web.UI.PageIndexSettings, Telerik.Cms" viewSettingsControl="Telerik.Cms.Web.UI.SearchViewControl, Telerik.Cms" description="Provides indexing services for CMS Pages."/> 
       </indexingClients> 
      </search> 

    Let us know how it goes.

    Greetings,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  6. Andrew Browne
    Andrew Browne avatar
    4 posts
    Registered:
    11 Apr 2006
    14 Nov 2007
    Link to this post
    Thank you very much this fixed the problem.
  7. Zubair
    Zubair avatar
    142 posts
    Registered:
    26 Dec 2007
    31 Mar 2008
    Link to this post
    I'm having exactly the same problem and yes the web.config has defaultprovider="Search".

    It looks like you've made some fixes on Search in the v3.2 patch, but I haven't applied it yet, one because I'm really sure that it can solve my problem, two I'm afraid that it might render my installation useless then doing any good.

    Please suggest.
  8. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    01 Apr 2008
    Link to this post
    Hi Zubair,

    Please give us more details to localize the problem.
    Do you receive exactly the same error:

    A required control was not found in the template for "Telerik.Search.WebControls.SearchResult+Container". The control must be assignable form type "System.Web.UI.Control" and must have ID "rptResults".

    In case of encountering the same exception, please check if you have a Repeater with ID "rptResults" in ~/Sitefinity/ControlTemplates/Search/SearchResult template.
    Also, did you upgrade your project using the patch and if yes, from and to which Sitefinity version?


    Thanks for your cooperation in advance.


    Greetings,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  9. Zubair
    Zubair avatar
    142 posts
    Registered:
    26 Dec 2007
    01 Apr 2008
    Link to this post

    Hi Pepi,

    I'm using Sitefinity v.3.2 (no SP1 yet) and I get the error

    A required control was not found in the template for "Telerik.Search.WebControls.SearchResult+Container". The control must be assignable form type "Telerik.Cms.Engine.WebControls.Pager" and must have ID "pager1".

    I looked in ~/Sitefinity/ControlTemplates/Search/SearchResult but it doesn't have any control with id 'pager1'.

    This use to work fine in the old version.
  10. Pepi
    Pepi avatar
    981 posts
    Registered:
    08 Dec 2016
    01 Apr 2008
    Link to this post
    Hello Zubair,

    Thanx for providing these details. For some reason you are not using the right template for SearchResults control. Please unzip the attached archive in the ~/Sitefinity/ControlTemplates/Search folder and make sure the old file has been replaced with the one from the attachment. It must contain a Pager control with ID "pager1".

    Do let us know how it goes.

    Sincerely yours,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  11. Zubair
    Zubair avatar
    142 posts
    Registered:
    26 Dec 2007
    01 Apr 2008
    Link to this post
    This solves the problem.

    Thanks.
Register for webinar
11 posts, 0 answered