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

Forums / Developing with Sitefinity / Error when adding external template

Error when adding external template

5 posts, 0 answered
  1. Simon
    Simon avatar
    31 posts
    Registered:
    01 May 2009
    14 May 2009
    Link to this post
    Hi,
    I'm trying to add the NewsItemEdit.ascx and NewsItemNew.ascx templates to my solution in order to access the RadEditor control.
    I have refernced them in the configuration file.
    <!--Provides user interface for editing a news item in the News module.--> 
    <viewSettings hostType="Telerik.News.WebControls.Admin.NewsItemEdit" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/NewsItemEdit.ascx" /> 
    <!--Provides user interface for adding new news items in the News module.--> 
    <viewSettings hostType="Telerik.News.WebControls.Admin.NewsItemNew" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/NewsItemNew.ascx" /> 

    However if I now try to edit a news item or add a new item I get this error.

    Server Error in '/' Application.

    The method or operation is not implemented.

    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.NotImplementedException: The method or operation is not implemented.

    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:

    [NotImplementedException: The method or operation is not implemented.]
       Telerik.Libraries.WebControls.DefaultTemplate.InstantiateIn(Control container) +55
       Telerik.Libraries.WebControls.ButtonSelector.CreateChildControls() +96
       System.Web.UI.Control.EnsureChildControls() +87
       System.Web.UI.Control.PreRenderRecursiveInternal() +44
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Control.PreRenderRecursiveInternal() +171
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +842
    

    Is there something else I should be doing?

    Thanks
    Simon
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    15 May 2009
    Link to this post
    Hello Simon,

    Thank you for using our services.

    The problem is due to the reason that you do not have/ or asp does not have access to the following file
    ~/Sitefinity/Admin/ControlTemplates/News/Dialogs/ButtonSelector.ascx. I am sending you ButtonSelector.ascx file. You can add it in the above specified path in case it does not exists there.

    I hope this helps.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Venkat
    Venkat avatar
    105 posts
    Registered:
    20 Nov 2008
    20 May 2009
    Link to this post
    Hi Ivan,

    I am using Sitefinity 3.6 version and enabled workflow on news .

    I added the code that sends a mail to the approver after clicking on the button 'send for approval'.

    but the workflow.Command event not raising when  click on the button

    'send for approval' .

    I added  code behind file to the usercontrol NewsItemEdit.ascx.

    made the changes to the config file in App_Code/Configuration.

    in the page load event I added the workflow command event but it is not raising at all.

    here is the code for NewsItemEdit.ascx.cs

     

    <FONT color=#0000ff size=2><FONT color=#0000ff size=2>  
    <P>using</FONT></FONT><FONT size=2> Telerik.Workflow;</P></FONT><FONT   
    color=#0000ff size=2><FONT color=#0000ff size=2>  
    <P>using</FONT></FONT><FONT size=2> System.Configuration;</P></FONT><FONT   
    color=#0000ff size=2><FONT color=#0000ff size=2>  
    <P>using</FONT></FONT><FONT size=2> System.Net.Mail;</P></FONT><FONT   
    color=#0000ff size=2><FONT color=#0000ff size=2>  
    <P>using</FONT></FONT><FONT size=2> Telerik.News;</P></FONT><FONT color=#0000ff   
    size=2><FONT color=#0000ff size=2>  
    <P>using</FONT></FONT><FONT size=2> Telerik.Cms.Engine;</P></FONT><FONT   
    color=#0000ff size=2><FONT color=#0000ff size=2>  
    <P>using</FONT></FONT><FONT size=2>   
    Telerik.Workflow.WebControls;</P></FONT><FONT color=#0000ff size=2><FONT   
    color=#0000ff size=2>  
    <P>using</FONT></FONT><FONT size=2>   
    Telerik.Events.WebControls.Admin;</P></FONT><FONT color=#0000ff size=2><FONT   
    color=#0000ff size=2>  
    <P>public</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff size=2><FONT   
    color=#0000ff size=2>partial</FONT></FONT><FONT size=2> </FONT><FONT   
    color=#0000ff size=2><FONT color=#0000ff size=2>class</FONT></FONT><FONT size=2>   
    </FONT><FONT color=#2b91af size=2><FONT color=#2b91af   
    size=2>Sitefinity_Admin_ControlTemplates_News_NewsItemEdit</FONT></FONT><FONT   
    size=2> : System.Web.UI.</FONT><FONT color=#2b91af size=2><FONT color=#2b91af   
    size=2>UserControl</P></FONT></FONT><FONT size=2>  
    <P>{</P>  
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff   
    size=2>protected</FONT></FONT><FONT size=2> </FONT><FONT color=#0000ff   
    size=2><FONT color=#0000ff size=2>void</FONT></FONT><FONT size=2>   
    Page_Load(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff   
    size=2>object</FONT></FONT><FONT size=2> sender, </FONT><FONT color=#2b91af   
    size=2><FONT color=#2b91af size=2>EventArgs</FONT></FONT><FONT size=2> e)</P>  
    <P>{</P>  
    <P>workflowMenu.Command += </FONT><FONT color=#0000ff size=2><FONT color=#0000ff   
    size=2>new</FONT></FONT><FONT size=2> </FONT><FONT color=#2b91af size=2><FONT   
    color=#2b91af size=2>CommandEventHandler</FONT></FONT><FONT   
    size=2>(workflowMenu_Command);</P>  
    <P>}</P>  
    <P>&nbsp;</P>  
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff   
    size=2>void</FONT></FONT><FONT size=2> workflowMenu_Command(</FONT><FONT   
    color=#0000ff size=2><FONT color=#0000ff size=2>object</FONT></FONT><FONT   
    size=2> sender, </FONT><FONT color=#2b91af size=2><FONT color=#2b91af   
    size=2>CommandEventArgs</FONT></FONT><FONT size=2> e)</P>  
    <P>{</P>  
    <P></FONT><FONT color=#0000ff size=2><FONT color=#0000ff   
    size=2>try</P></FONT></FONT><FONT size=2>  
    <P>{<BR>//Mail sending logic.<BR>}<BR>}<BR>}</P></FONT> 

  4. Venkat
    Venkat avatar
    105 posts
    Registered:
    20 Nov 2008
    20 May 2009
    Link to this post
    sorry

    here is the Code behind file NewsItemEdit.ascx.cs

    using

     

    Telerik.Workflow;
    using System.Configuration;
    using System.Net.Mail;
    using Telerik.News;
    using Telerik.Cms.Engine;
    using Telerik.Workflow.WebControls;
    using Telerik.Events.WebControls.Admin;

     

    public

     

    partial class Sitefinity_Admin_ControlTemplates_News_NewsItemEdit : System.Web.UI.UserControl
    {
    protected
    void Page_Load(object sender, EventArgs e)
    {
    workflowMenu.Command +=
    new CommandEventHandler(workflowMenu_Command);
    }

     

     

    void workflowMenu_Command(object sender, CommandEventArgs e)
    {
    try
    {
    }
    }

     

  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    20 May 2009
    Link to this post
    Hi Venkat,

    The Workflow control with ID="workflowMenu" in not declared in your template. Try adding code behind on NewsItemPreview. The Workflow control should be there.

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
Register for webinar
5 posts, 0 answered