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

Forums / General Discussions / Error when logged in after SP1 upgrade

Error when logged in after SP1 upgrade

6 posts, 0 answered
  1. Josh Anderson
    Josh Anderson avatar
    48 posts
    Registered:
    15 Dec 2005
    11 Mar 2011
    Link to this post
    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) +2207

    This isn't a huge problem as we don't use the in-place editing features, but in case this could cause other issues I wanted to address it.

    UPDATE:
    This appears only to happen on my home page, not any of the sub-pages.

    Josh
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    14 Mar 2011
    Link to this post
    Hi 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
  3. Josh Anderson
    Josh Anderson avatar
    48 posts
    Registered:
    15 Dec 2005
    16 Mar 2011
    Link to this post
    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
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    18 Mar 2011
    Link to this post
    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
  5. Josh Anderson
    Josh Anderson avatar
    48 posts
    Registered:
    15 Dec 2005
    18 Mar 2011
    Link to this post
    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>

    I removed the news widget and re-added it, but I'm still getting the same error.
  6. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    18 Mar 2011
    Link to this post
    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
6 posts, 0 answered