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

Forums / Bugs & Issues / TagName collision

TagName collision

4 posts, 1 answered
  1. Thomas
    Thomas avatar
    223 posts
    Registered:
    19 Jan 2011
    09 Aug 2011
    Link to this post
    Hi,

    Here's the scenario: I create 2 widgets that I add to the toolbox.
    My widget namespaces / paths are as follows: ProjectName.Widgets.Widget1.Main and Projectname.Widgets.Widget2.Main
    However, this generates the following code if both widgets are placed on the same page:

    <%@ Register TagPrefix="sf" TagName="Main" Src="~/Widgets/Widget1/Main.ascx" %>
    <%@ Register TagPrefix="sf" TagName="Main" Src="~/Widgets/Widget2/Main.ascx" %>

    This results in a conflict when viewing the page on the front side:

    Parser Error

    Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

    Parser Error Message: The 'sf:Main' tag has already been registered.

    However, it works fine in the back office and in preview mode.

    I understand I could name my controls differently to avoid this, but I thought it would be good if SF could handle this (and generate unique TagNames for each widget, use the widget name rather than control name, or something).
  2. Radoslav Georgiev
    Radoslav Georgiev avatar
    3370 posts
    Registered:
    01 Feb 2016
    12 Aug 2011
    Link to this post
    Hi Thomas,

    Thank you for contacting us.

    The problem is the same Class names used for your widgets. When we build the markup the pages and register widget tags in the page to be rendered we use the class name to construct the registration directive and the name of the ASCX file if you are using user controls. We are working on a solution for this however I cannot give you a time frame at the moment. As a workaround you can try renaming the class name and ascx file of one of the widgets.

    Kind regards,
    Radoslav Georgiev
    the Telerik team
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
  3. Lori
    Lori avatar
    4 posts
    Registered:
    25 Feb 2009
    07 Jan 2015 in reply to Radoslav Georgiev
    Link to this post
    Has this ever been resolved because I am seeing the issue in product version 6.3.5000.0.
  4. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    Registered:
    29 Nov 2016
    12 Jan 2015
    Link to this post
    Hi Lori,

    In order to have this work, you can use custom widget instead of user widget.

    More information about registering them in the toolbox is available here.

    Regards,
    Svetoslav Manchev
    Telerik
     
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
     
4 posts, 1 answered