Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • AhmadOsman 8 posts 88 karma points
    Apr 27, 2018 @ 16:35
    AhmadOsman
    0

    An item with the same key has already been added.

    I have problem with my umbraco 7.10.0 assembly: 1.0.6659.16870 site. it sometimes shows 500 error. An item with the same key has already been added.

    if (CurrentPage.HasValue("dePage"))
    {
        ICollection<Umbraco.Core.Models.IPublishedContent> deList = CurrentPage.dePage;
        foreach (var item in deList)
        {
            deurl = item.Url;
        }
    }
    

    the Error in this line

     ICollection<Umbraco.Core.Models.IPublishedContent> deList = CurrentPage.dePage;
    

    [ArgumentException: An item with the same key has already been added.] System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +52 System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) +183 Umbraco.Core.Services.IdkMap.Populate(IEnumerable1 pairs, UmbracoObjectTypes umbracoObjectType) in D:\a\1\s\src\Umbraco.Core\Services\IdkMap.cs:79 Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedContentCache.EnsureIdkMap(UmbracoContext umbracoContext) in D:\a\1\s\src\Umbraco.Web\PublishedCache\XmlPublishedCache\PublishedContentCache.cs:369 Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedContentCache.GetById(UmbracoContext umbracoContext, Boolean preview, Guid nodeKey) in D:\a\1\s\src\Umbraco.Web\PublishedCache\XmlPublishedCache\PublishedContentCache.cs:427 Umbraco.Web.PublishedCache.ContextualPublishedContentCache.GetById(Boolean preview, Guid contentKey) in D:\a\1\s\src\Umbraco.Web\PublishedCache\ContextualPublishedContentCache.cs:27 Umbraco.Web.PublishedContentQuery.TypedContent(Guid id) in D:\a\1\s\src\Umbraco.Web\PublishedContentQuery.cs:70 Umbraco.Web.PublishedContentQueryExtensions.TypedContent(ITypedPublishedContentQuery contentQuery, Udi id) in D:\a\1\s\src\Umbraco.Web\PublishedContentQueryExtensions.cs:18 Umbraco.Web.UmbracoHelper.TypedContent(Udi id) in D:\a\1\s\src\Umbraco.Web\UmbracoHelper.cs:639 Umbraco.Web.PropertyEditors.ValueConverters.MultiNodeTreePickerPropertyConverter.GetPublishedContent(T nodeId, UmbracoObjectTypes& actualType, UmbracoObjectTypes expectedType, Func2 contentFetcher) in D:\a\1\s\src\Umbraco.Web\PropertyEditors\ValueConverters\MultiNodeTreePickerPropertyConverter.cs:207 Umbraco.Web.PropertyEditors.ValueConverters.MultiNodeTreePickerPropertyConverter.ConvertSourceToObject(PublishedPropertyType propertyType, Object source, Boolean preview) in D:\a\1\s\src\Umbraco.Web\PropertyEditors\ValueConverters\MultiNodeTreePickerPropertyConverter.cs:170 Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedProperty.get_Value() in D:\a\1\s\src\Umbraco.Web\PublishedCache\XmlPublishedCache\XmlPublishedProperty.cs:51 Umbraco.Web.Models.DynamicPublishedContent.TryGetUserProperty(GetMemberBinder binder) in D:\a\1\s\src\Umbraco.Web\Models\DynamicPublishedContent.cs:202 Umbraco.Web.Models.<>c__DisplayClass22_0.<TryGetMember>b__0(Func2 m) in D:\a\1\s\src\Umbraco.Web\Models\DynamicPublishedContent.cs:256 System.Linq.WhereSelectListIterator2.MoveNext() +99 System.Linq.WhereEnumerableIterator1.MoveNext() +209 Umbraco.Web.Models.DynamicPublishedContent.TryGetMember(GetMemberBinder binder, Object& result) in D:\a\1\s\src\Umbraco.Web\Models\DynamicPublishedContent.cs:255 CallSite.Target(Closure , CallSite , Object ) +159 System.Dynamic.UpdateDelegates.UpdateAndExecute1(CallSite site, T0 arg0) +629 ASP.PageViewsPartialsEnDeHeadercshtml.Execute() in c:\Inetpub\vhosts\ahmad-osman.com\MySite\Views\Partials\EnDeHeader.cshtml:10 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +198 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +105 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +90 System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +235 System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107 Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) in D:\a\1\s\src\Umbraco.Web\Mvc\ProfilingView.cs:24 System.Web.Mvc.HtmlHelper.RenderPartialInternal(String partialViewName, ViewDataDictionary viewData, Object model, TextWriter writer, ViewEngineCollection viewEngineCollection) +277 System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +91 System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName) +32 ASP.PageViewsSitecshtml.Execute() in c:\Inetpub\vhosts\ahmad-osman.com\MySite\Views\Site.cshtml:187 System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +198 System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +105 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +90 System.Web.WebPages.<>cDisplayClass3.2(TextWriter writer) +232 System.Web.WebPages.HelperResult.WriteTo(TextWriter writer) +10 System.Web.WebPages.WebPageBase.Write(HelperResult result) +80 System.Web.WebPages.WebPageBase.RenderSurrounding(String partialViewName, Action1 body) +63 System.Web.WebPages.WebPageBase.PopContext() +237 System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +98 System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance) +235 System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer) +107 Umbraco.Core.Profiling.ProfilingView.Render(ViewContext viewContext, TextWriter writer) in D:\a\1\s\src\Umbraco.Web\Mvc\ProfilingView.cs:24 System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +290 System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +13 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +56 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +420 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList1 filters, ActionResult actionResult) +52 System.Web.Mvc.Async.<>cDisplayClass2b.1c() +173 System.Web.Mvc.Async.<>cDisplayClass21.1e(IAsyncResult asyncResult) +100 System.Web.Mvc.Async.WrappedAsyncResult1.CallEndDelegate(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27 System.Web.Mvc.Controller._5(IAsyncResult asyncResult, ProcessRequestState innerState) +21 System.Web.Mvc.Async.WrappedAsyncVoid1.CallEndDelegate(IAsyncResult asyncResult) +29 System.Web.Mvc.Async.WrappedAsyncResultBase1.End() +49 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +28 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result) +9 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +9749889 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +48 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +159 Any help, please

  • Kevin Jump 1867 posts 11859 karma points MVP 4x c-trib
    Apr 27, 2018 @ 18:41
    Kevin Jump
    102

    Hi

    I had the same issue but there is a fix in the 7.10.4 release which has made this issue go away for me : )

    see : http://issues.umbraco.org/issue/U4-11208

  • AhmadOsman 8 posts 88 karma points
    Apr 27, 2018 @ 21:37
    AhmadOsman
    0

    Thanks a lot this work for me too

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies