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

Forums / Bugs & Issues / Problem mapping a layout on search

Problem mapping a layout on search

9 posts, 0 answered
  1. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    13 Jan 2011
    Link to this post
    I have a usercontrol on my masterpage, usercontrol has a searchbox in which I was trying to map a template to an ascx on my filesystem

    <sitefinity:SearchBox id="searchbar" runat="server" LayoutTemplatePath="~/UserControls/Menu/SearchView.ascx"  />

    Setting this though causes everything to crap out...runtime errors allover the place I cant even get to /Sitefinity/Pages

    A required control was not found in the template for "Telerik.Sitefinity.Resources.Templates.Backend.Search.SearchWidget.ascx". The control must be assignable form type "Telerik.Sitefinity.Web.UI.SearchBox" and must have ID "searchBox".

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: Telerik.Sitefinity.Web.UI.TemplateException: A required control was not found in the template for "Telerik.Sitefinity.Resources.Templates.Backend.Search.SearchWidget.ascx". The control must be assignable form type "Telerik.Sitefinity.Web.UI.SearchBox" and must have ID "searchBox".

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [TemplateException: A required control was not found in the template for "Telerik.Sitefinity.Resources.Templates.Backend.Search.SearchWidget.ascx". The control must be assignable form type "Telerik.Sitefinity.Web.UI.SearchBox" and must have ID "searchBox".]
       Telerik.Sitefinity.Web.UI.GenericContainer.ThrowException(Type requiredType, String controlId) +74
       Telerik.Sitefinity.Web.UI.GenericContainer.GetControl(String id, Boolean required) +262
       Telerik.Sitefinity.Web.UI.Backend.Elements.Widgets.<GetScriptDescriptors>d__6.MoveNext() +202
       System.Web.UI.ScriptControlManager.RegisterScriptsForScriptDescriptors(IEnumerable`1 scriptDescriptors, Control control) +299
       System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl) +190
       Telerik.Sitefinity.Web.UI.SimpleScriptView.Render(HtmlTextWriter writer) +150
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +315
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.Page.Render(HtmlTextWriter writer) +40
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5274
    



    A required control was not found in the template for "Telerik.Sitefinity.Resources.Templates.Backend.Search.SearchWidget.ascx". The control must be assignable form type "Telerik.Sitefinity.Web.UI.SearchBox" and must have ID "searchBox".

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: Telerik.Sitefinity.Web.UI.TemplateException: A required control was not found in the template for "Telerik.Sitefinity.Resources.Templates.Backend.Search.SearchWidget.ascx". The control must be assignable form type "Telerik.Sitefinity.Web.UI.SearchBox" and must have ID "searchBox".

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [TemplateException: A required control was not found in the template for "Telerik.Sitefinity.Resources.Templates.Backend.Search.SearchWidget.ascx". The control must be assignable form type "Telerik.Sitefinity.Web.UI.SearchBox" and must have ID "searchBox".]
       Telerik.Sitefinity.Web.UI.GenericContainer.ThrowException(Type requiredType, String controlId) +74
       Telerik.Sitefinity.Web.UI.GenericContainer.GetControl(String id, Boolean required) +262
       Telerik.Sitefinity.Web.UI.Backend.Elements.Widgets.<GetScriptDescriptors>d__6.MoveNext() +202
       System.Web.UI.ScriptControlManager.RegisterScriptsForScriptDescriptors(IEnumerable`1 scriptDescriptors, Control control) +299
       System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl) +190
       Telerik.Sitefinity.Web.UI.SimpleScriptView.Render(HtmlTextWriter writer) +150
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +15
       System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +52
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +315
       System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +48
       System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +246
       System.Web.UI.Page.Render(HtmlTextWriter writer) +40
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5274
    
  2. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    13 Jan 2011
    Link to this post
    Ok, this is worse than I thought

    Removing that template doesnt fix issue

    I cant even get to the backend of sitefinity ANYWHERE anymore (...anywhere where there would be a searchbox which is almost everywhere), even after a new build and recycling the AppPool

    Help :(
  3. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    13 Jan 2011
    Link to this post
    Hello Steve,

    Have you tried to remove this control from the template

    <sitefinity:SearchBox id="searchbar" runat="server" LayoutTemplatePath="~/UserControls/Menu/SearchView.ascx"  />

    Kind regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  4. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    13 Jan 2011
    Link to this post
    Yes, believe me, I've tried removing just the layout property, then the whole control

    What do I change in the DB to have it use it's default layout

    I've put in a ticket containing the DB, I have to show this tomorrow so I was hoping to work on it more today, but I can't get anywhere in the backend

    The frontend pages work fine, but for some reason me changing that told the backend search box to use a different template

  5. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    13 Jan 2011
    Link to this post
    Tried removing the Property, then the control,building the project, recycling the apppool

    Nothing I do does anything to get by this
  6. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    13 Jan 2011
    Link to this post
    If I was to have mapped an incorrect LayoutTemplate on a backend control on a production system, hell even a dev database how would I ever be able to recover from this if I can't even get INTO the backend.
  7. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    14 Jan 2011
    Link to this post
    Hello Steve,

    Did the proposed solution in the support ticket you have opened resolve the issue?

    Greetings,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. Jochem Bökkers
    Jochem Bökkers avatar
    787 posts
    Registered:
    13 Aug 2007
    30 Mar 2011
    Link to this post
    Hey Steve/Radoslav,

    I was wondering what the status was for a search template.
    After reading this I'm a bit careful before fiddling with it myself. Was it something totally unrelated that caused the entire back end to freeze up or are we better of using the standard search ?

    Jochem
  9. Steve
    Steve avatar
    3037 posts
    Registered:
    03 Dec 2008
    30 Mar 2011
    Link to this post
    @Jochem
      No it's all good...the namespace I mapped in my webconfig so I could use the search control in the masterpage was the BACKEND search control so it got confused :)

    This was so I could map the control as <sf:SearchBox or something like that, has nothing to do with mapping a template.  As long as the external template exists where you map it, you'll be fine

    Steve
9 posts, 0 answered