Error when logged in after SP1 upgrade
I just upgraded my 4.0 site to 4.0SP1, and while the management interface and the site itself works fine, I'm getting the error "An item with the same key has already been added" when I try to browse the site while logged in. It appears that there's something wrong with the building of the browse/edit tools. Here's the stack trace:
[ArgumentException: An item with the same key has already been added.] System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +52 System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +9382923 System.Collections.Generic.Dictionary`2.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.Add(KeyValuePair`2 keyValuePair) +39 Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit.ContentBrowseAndEditToolbar.ManageMode(BrowseAndEditToolbarMode mode, String controlID, String commandName, SecurityActionTypes securityType) +821 Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit.ContentBrowseAndEditToolbar.InitializeCommands() +82 Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit.ContentBrowseAndEditToolbar.Configure(ContentView host, Content contentItem, Content parentItem) +699 Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit.BrowseAndEditManagerExtensions.AddConfiguredContentBrowseAndEditToolBar(BrowseAndEditManager manager, Content contentItem, ContentView host, ContentBrowseAndEditToolbar toolbar, Content parentItem) +38 Telerik.Sitefinity.Modules.News.Web.UI.MasterListView.NewsList_DataBound(Object sender, EventArgs e) +112 System.Web.UI.WebControls.BaseDataBoundControl.OnDataBound(EventArgs e) +105 System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +154 System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +33 System.Web.UI.WebControls.DataBoundControl.PerformSelect() +143 Telerik.Web.UI.RadListView.PerformSelect() +24 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +74 Telerik.Web.UI.RadListView.DataBind() +17 Telerik.Web.UI.RadListView.AutoDataBind(RadListViewRebindReason rebindReason) +147 Telerik.Web.UI.RadListView.OnLoad(EventArgs e) +223 System.Web.UI.Control.LoadRecursive() +74 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Control.LoadRecursive() +146 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207Hi Josh ,
Can you edit the home page and add the controls on it again? Also make sure that you do not have duplicate entries inside ~/App_Data/Sitefinity/Configuration/ToolboxesConfig.config
Best wishes,
Ivan Dimitrov
the Telerik team
Is there no other way to troubleshoot this than rebuilding the home page? As this is a production site, I can't really go messing with the content and layout at this point.
I confirmed there are no duplicate entries int he ToolboxesConfig.config file.
Josh
Hello Josh,
The error says that there is some issue with BrowseAndEdit for NewsView widgnet which you have on a page. Please try to edit the page and add the widget again on the home page. If the problem persists can you tell me whether you set some properties over the NewsView, can you replicate the issue on another page which also uses NewsView, do you have custom controls on the problematic page
Greetings,
Ivan Dimitrov
the Telerik team
No custom controls on that page. The news list is using a custom template, but it only has minor changes to the existing template. If I use the default template, I still get the error. Here is my custom template:
<%@ Control Language="C#" %><%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.ContentUI" Assembly="Telerik.Sitefinity" %><%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.Comments" Assembly="Telerik.Sitefinity" %><%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI" Assembly="Telerik.Sitefinity" %><%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %><%@ Register TagPrefix="sf" Namespace="Telerik.Sitefinity.Web.UI.PublicControls.BrowseAndEdit" Assembly="Telerik.Sitefinity" %><telerik:RadListView ID="NewsList" ItemPlaceholderID="ItemsContainer" runat="server" EnableEmbeddedSkins="false" EnableEmbeddedBaseStylesheet="false"> <LayoutTemplate> <sf:ContentBrowseAndEditToolbar ID="MainBrowseAndEditToolbar" runat="server" Mode="Add"></sf:ContentBrowseAndEditToolbar> <ul class="sfnewsList sfnewsListTitleDateSummary"> <asp:PlaceHolder ID="ItemsContainer" runat="server" /> </ul> </LayoutTemplate> <ItemTemplate> <li class="sfnewsListItem"> <sf:DetailsViewHyperLink ID="DetailsViewHyperLink1" TextDataField="Title" ToolTipDataField="Description" runat="server" /> <span> <sf:FieldListView ID="PublicationDate" runat="server" Format="PublicationDate.ToLocal():MMM dd, yyyy" /> </span> <sf:FieldListView ID="summary" runat="server" Text="0" Properties="Summary" WrapperTagName="p" /> <sf:ContentBrowseAndEditToolbar ID="BrowseAndEditToolbar" runat="server" Mode="Edit,Delete,Unpublish"></sf:ContentBrowseAndEditToolbar> </li> </ItemTemplate></telerik:RadListView><sf:Pager id="pager" runat="server"></sf:Pager>Hi Josh ,
Ok, please open a support ticket and send the project to us - database and project files (you can provide external link or FTP). I am not able to replicate the issue and it looks like that something went wrong during the upgrade.
All the best,
Ivan Dimitrov
the Telerik team