More in this section

Blog Provider

7 posts, 0 answered
  1. Tim
    Tim avatar
    156 posts
    Registered:
    23 Sep 2007
    28 Jan 2008
    Link to this post
    Sitefinity Support,

    I added a custom provider for blog named "pets" based on your documentation.

    <add name="Pets" 
                   defaultMetaField="Title" 
                   visible="False" 
                   applicationName="/PetsBlogs" 
                   allowVersioning="True" 
                   allowLocalization="False" 
                   localizationProviderName="" 
                   allowWorkflow="False" 
                   securityProviderName="" 
                   versioningProviderName="" 
                   connectionStringName="GenericContentConnection" 
                   type="Telerik.Blogs.Data.DefaultBlogProvider, Telerik.Blogs.Data" 
                   listTemplate="~/Sitefinity/Admin/ControlTemplates/Pets_Blogs/ControlPanelList.ascx" 
                   insertTemplate="~/Sitefinity/Admin/ControlTemplates/Pets_Blogs/ControlPanelInsert.ascx" 
                   editTemplate="~/Sitefinity/Admin/ControlTemplates/Pets_Blogs/ControlPanelEdit.ascx" 
                   permissionsTemplate="~/Sitefinity/Admin/ControlTemplates/Pets_Blogs/ControlPanelPermissions.ascx" 
                   commandPanelTemplate="~/Sitefinity/Admin/ControlTemplates/Pets_Blogs/CommandPanel.ascx" 
                   editorTemplate="~/Sitefinity/Admin/ControlTemplates/Pets_Blogs/EditorTemplate.ascx" 
                   shareContentDialogTemplate="~/Sitefinity/Admin/ControlTemplates/Pets_Blogs/NewContentDialog.ascx" 
                   selectContentDialogTemplate="~/Sitefinity/Admin/ControlTemplates/Pets_Blogs/SelectContentDialog.ascx" 
                   contentVersionViewUrl="~/Sitefinity/Admin/ControlTemplates/Pets_Blogs/ContentVersionView.aspx" 
                   commentsListTemplate="~/Sitefinity/Admin/ControlTemplates/Generic_Content/CommentsList.ascx" 
                   commentsEditTemplate="~/Sitefinity/Admin/ControlTemplates/Generic_Content/CommentsEdit.ascx" 
                   commentsListPublicTemplate="~/Sitefinity/ControlTemplates/Generic_Content/CommentsList.ascx" 
                   singlePostTemplate="~/Sitefinity/ControlTemplates/Pets_Blogs/SinglePostTemplate.ascx" 
                   postListTemplate="~/Sitefinity/ControlTemplates/Pets_Blogs/PostListTemplate.ascx" 
                   contentSelectorTemplate="~/Sitefinity/Admin/ControlTemplates/Generic_Content/ContentSelector.ascx"/> 

    <add key="Pets.Title" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" /> 
                    <add key="Pets.Author" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" /> 
                    <add key="Pets.Publication_Date" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue="#Now" /> 
                    <add key="Pets.BlogID" valueType="Guid" visible="False" searchable="True" sortable="True" defaultValue="" /> 
                    <add key="Pets.Category" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""
                    </add> 


    I got a exception when I tried to create a category under pets group and following is the error message:

    A required control was not found in the template for "Telerik.Cms.Engine.WebControls.Categories.CategoriesManagement+CategoriesContainer". The control must be assignable form type "System.Web.UI.Control" and must have ID "emptyWindow".

    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: System.Web.HttpException: A required control was not found in the template for "Telerik.Cms.Engine.WebControls.Categories.CategoriesManagement+CategoriesContainer". The control must be assignable form type "System.Web.UI.Control" and must have ID "emptyWindow".

    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:

    [HttpException (0x80004005): A required control was not found in the template for "Telerik.Cms.Engine.WebControls.Categories.CategoriesManagement+CategoriesContainer". The control must be assignable form type "System.Web.UI.Control" and must have ID "emptyWindow".]
    Telerik.Cms.Web.UI.GenericContainer`1.FindControl(Type requiredType, String id, Boolean required) +234
    Telerik.Cms.Web.UI.GenericContainer`1.FindRequiredControl(String id) +66
    Telerik.Cms.Engine.WebControls.Categories.CategoriesContainer.get_EmptyWindow() +34
    Telerik.Cms.Engine.WebControls.Categories.CategoriesManagement.GridCategories_DataBound(Object sender, EventArgs e) +19
    System.Web.UI.WebControls.BaseDataBoundControl.OnDataBound(EventArgs e) +86
    System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +137
    System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +29
    System.Web.UI.WebControls.DataBoundControl.PerformSelect() +149
    System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
    System.Web.UI.WebControls.GridView.DataBind() +4
    System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
    System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69
    System.Web.UI.Control.EnsureChildControls() +87
    System.Web.UI.Control.PreRenderRecursiveInternal() +50
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Control.PreRenderRecursiveInternal() +170
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041


    Please help!

    Tim
  2. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    29 Jan 2008
    Link to this post
    Hi Tim,

    That means that the template for the category management is missing or is not the correct one. The name of the attribute for setting this template is categoriesManagementTemplate. Also, if you are using v3.1, you may find it easier to copy the entire folder ~/Sitefinity/Admin/ControlTemplates/Blogs and rename it to the same name as the provider, in your case "Pets". If you choose the second approach, don’t forget to remove all paths specified in the web.config for that provider as they will override the default ones.

    Hope this helps.

    Greetings,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. Tim
    Tim avatar
    156 posts
    Registered:
    23 Sep 2007
    29 Jan 2008
    Link to this post
    I made changes based on your reply and now I got ' Post not found' error when I click one of post.

    Please help
    Tim
  4. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    30 Jan 2008
    Link to this post
    Hi Tim,

    Please give us more information to reproduce the problem. Did you restart the application after making the changes? Also, it will be very helpful if you send us your web.config file to investigate it locally (you could just paste the content of the configuration file in the ticket).

    Thanks for your cooperation in advance.

    All the best,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  5. Tim
    Tim avatar
    156 posts
    Registered:
    23 Sep 2007
    30 Jan 2008
    Link to this post
    Following is my web.config for custom provider of pet blogs:

    <add name="Pets_Blogs" visible="False" defaultMetaField="Title" applicationName="/PetsBlogs" allowVersioning="True" allowLocalization="False" localizationProviderName="" allowWorkflow="False" securityProviderName="" versioningProviderName="" connectionStringName="GenericContentConnection" type="Telerik.Blogs.Data.DefaultBlogProvider, Telerik.Blogs.Data" /> 

    Note: copied the Blogs fold under ~/Sitefinity/Admin/ControlTemplates and renamed as Pets_Blogs.

    <add key="Pets_Blogs.Title" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" /> 
    <add key="Pets_Blogs.Author" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue="" /> 
    <add key="Pets_Blogs.Publication_Date" valueType="DateTime" visible="True" searchable="True" sortable="True" defaultValue="#Now" /> 
    <add key="Pets_Blogs.BlogID" valueType="Guid" visible="False" searchable="True" sortable="True" defaultValue="" /> 
    <add key="Pets_Blogs.Category" valueType="ShortText" visible="True" searchable="True" sortable="True" defaultValue=""
    </add> 

    <add providerName="Pets_Blogs" publicationDateField="Publication_Date" urlRewriteFormat="[Publication_Date]/[Title].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" /> 


    I created a page and dropped the blogs control on it. Then I chose the Pets_Blogs as data provider for the blogs  control. The blog list shows fine on the page. But when you click any of the post, it gives you "Post not found " error message.

    Hope I made myself clear.
    Thanks
    Tim
  6. Tim
    Tim avatar
    156 posts
    Registered:
    23 Sep 2007
    31 Jan 2008
    Link to this post
    Sitefinity Support,

    I am just wondering if you have figured it out what's going on. It's very important for us and we are still waiting for the solutions.

    Thanks
    Tim
  7. Pepi
    Pepi avatar
    981 posts
    Registered:
    31 Jan 2017
    31 Jan 2008
    Link to this post
    Hi Tim,

    Thanks a lot for pointing out this issue. We will investigate what causes the problem.

    The workaround is to display single posts in a separate page by setting the ExternalSinglePostPage property to lead to a page that contains the SinglePost control. Don't forget to copy the Blogs folder in ~/Sitefinity/Admin/ControlTemplates/ and rename it to Pets_Blogs. Also, the ProviderName property of the SinglePost control should be set to Pets_Blogs to use the new blog provider.

    As a note of gratitude, your Telerik points have been updated.

    Kind regards,
    Pepi
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
Register for webinar
7 posts, 0 answered