Problem mapping a layout on search

Posted by Community Admin on 04-Aug-2018 05:39

Problem mapping a layout on search

All Replies

Posted by Community Admin on 13-Jan-2011 00:00

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

Posted by Community Admin on 13-Jan-2011 00:00

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 :(

Posted by Community Admin on 13-Jan-2011 00:00

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

Posted by Community Admin on 13-Jan-2011 00:00

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

Posted by Community Admin on 13-Jan-2011 00:00

Tried removing the Property, then the control,building the project, recycling the apppool

Nothing I do does anything to get by this

Posted by Community Admin on 13-Jan-2011 00:00

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.

Posted by Community Admin on 14-Jan-2011 00:00

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

Posted by Community Admin on 30-Mar-2011 00:00

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

Posted by Community Admin on 30-Mar-2011 00:00

@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

This thread is closed