TagName collision

Posted by Community Admin on 04-Aug-2018 13:45

TagName collision

All Replies

Posted by Community Admin on 09-Aug-2011 00:00

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).

Posted by Community Admin on 12-Aug-2011 00:00

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

Posted by Community Admin on 07-Jan-2015 00:00

Has this ever been resolved because I am seeing the issue in product version 6.3.5000.0.

Posted by Community Admin on 12-Jan-2015 00:00

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
 

This thread is closed