Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
After I upgraded from v9 to v10 I got this error: "An item with the same key has already been added. Key: " and here is a stack trace
ArgumentException: An item with the same key has already been added. Key: 4262 System.Collections.Generic.Dictionary<TKey, TValue>.TryInsert(TKey key, TValue value, InsertionBehavior behavior) System.Collections.Generic.Dictionary<TKey, TValue>.Add(TKey key, TValue value) System.Linq.Enumerable.ToDictionary<TSource, TKey>(List<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer) System.Linq.Enumerable.ToDictionary<TSource, TKey>(IEnumerable<TSource> source, Func<TSource, TKey> keySelector, IEqualityComparer<TKey> comparer) System.Linq.Enumerable.ToDictionary<TSource, TKey>(IEnumerable<TSource> source, Func<TSource, TKey> keySelector) Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ContentTypeCommonRepository.MapHistoryCleanup(Dictionary<int, IContentTypeComposition> contentTypes) Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ContentTypeCommonRepository.GetAllTypesInternal() Umbraco.Extensions.AppCacheExtensions+<>c__DisplayClass0_0<T>.<GetCacheItem>b__0() Umbraco.Cms.Core.Cache.SafeLazy+<>c__DisplayClass1_0.<GetSafeLazy>b__0() Umbraco.Cms.Core.Cache.ObjectCacheAppCache.Get(string key, Func<object> factory, Nullable<TimeSpan> timeout, bool isSliding, string[] dependentFiles) Umbraco.Cms.Core.Cache.DeepCloneAppCache.Get(string key, Func<object> factory, Nullable<TimeSpan> timeout, bool isSliding, string[] dependentFiles) Umbraco.Extensions.AppCacheExtensions.GetCacheItem<T>(IAppPolicyCache provider, string cacheKey, Func<T> getCacheItem, Nullable<TimeSpan> timeout, bool isSliding, string[] dependentFiles) Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ContentTypeCommonRepository.GetAllTypes() Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ContentTypeRepository.GetAllWithFullCachePolicy() Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.ContentTypeRepositoryBase<TEntity>.PerformGetAll(int[] ids) Umbraco.Cms.Core.Cache.FullDataSetRepositoryCachePolicy<TEntity, TId>.GetAllCached(Func<TId[], IEnumerable<TEntity>> performGetAll) Umbraco.Cms.Core.Cache.FullDataSetRepositoryCachePolicy<TEntity, TId>.GetAll(TId[] ids, Func<TId[], IEnumerable<TEntity>> performGetAll) Umbraco.Cms.Infrastructure.Persistence.Repositories.Implement.EntityRepositoryBase<TId, TEntity>.GetMany(TId[] ids) Umbraco.Cms.Core.Services.ContentTypeServiceBase<TRepository, TItem>.GetAll(int[] ids) Umbraco.Cms.Infrastructure.PublishedCache.PublishedSnapshotService.LoadContentFromLocalDbLocked(bool onStartup) Umbraco.Cms.Infrastructure.PublishedCache.PublishedSnapshotService.<EnsureCaches>b__47_1() Umbraco.Cms.Infrastructure.PublishedCache.PublishedSnapshotService.LockAndLoadContent(Func<bool> action) Umbraco.Cms.Infrastructure.PublishedCache.PublishedSnapshotService.<EnsureCaches>b__47_0() System.Threading.LazyInitializer.EnsureInitializedCore<T>(ref T target, ref bool initialized, ref object syncLock, Func<T> valueFactory) System.Threading.LazyInitializer.EnsureInitialized<T>(ref T target, ref bool initialized, ref object syncLock, Func<T> valueFactory) Umbraco.Cms.Infrastructure.PublishedCache.PublishedSnapshotService.EnsureCaches() Umbraco.Cms.Infrastructure.PublishedCache.PublishedSnapshotService.CreatePublishedSnapshot(string previewToken) Umbraco.Cms.Web.Common.UmbracoContext.UmbracoContext+<>c__DisplayClass11_0.<.ctor>b__0() System.Lazy<T>.ViaFactory(LazyThreadSafetyMode mode) System.Lazy<T>.ExecutionAndPublication(LazyHelper executionAndPublication, bool useDefaultConstructor) System.Lazy<T>.CreateValue() System.Lazy<T>.get_Value() Umbraco.Cms.Web.Common.UmbracoContext.UmbracoContext.get_PublishedSnapshot() Umbraco.Cms.Web.Common.UmbracoContext.UmbracoContext.get_Content() Umbraco.Cms.Web.Website.Routing.UmbracoRouteValueTransformer.TransformAsync(HttpContext httpContext, RouteValueDictionary values) System.Threading.Tasks.ValueTask<TResult>.get_Result() System.Runtime.CompilerServices.ValueTaskAwaiter<TResult>.GetResult() Microsoft.AspNetCore.Mvc.Routing.DynamicControllerEndpointMatcherPolicy.ApplyAsync(HttpContext httpContext, CandidateSet candidates) Microsoft.AspNetCore.Routing.Matching.DfaMatcher.SelectEndpointWithPoliciesAsync(HttpContext httpContext, IEndpointSelectorPolicy[] policies, CandidateSet candidateSet) Microsoft.AspNetCore.Routing.EndpointRoutingMiddleware.<Invoke>g__AwaitMatch|8_1(EndpointRoutingMiddleware middleware, HttpContext httpContext, Task matchTask) SixLabors.ImageSharp.Web.Middleware.ImageSharpMiddleware.Invoke(HttpContext httpContext, bool retry) StackExchange.Profiling.MiniProfilerMiddleware.Invoke(HttpContext context) in MiniProfilerMiddleware.cs Umbraco.Cms.Web.Common.Middleware.UmbracoRequestMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Umbraco.Cms.Web.Common.Middleware.UmbracoRequestMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext() Umbraco.Cms.Web.Common.Middleware.PreviewAuthenticationMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext() Umbraco.Cms.Web.Common.Middleware.UmbracoRequestLoggingMiddleware.InvokeAsync(HttpContext context, RequestDelegate next) Microsoft.AspNetCore.Builder.UseMiddlewareExtensions+<>c__DisplayClass6_1+<<UseMiddlewareInterface>b__1>d.MoveNext() Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)
If I point the app to the test DB it starts fine, which leads me to believe its a data problem.
You can try to delete the duplicate record in [umbracoContentVersionCleanupPolicy] table
is working on a reply...
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.
Continue discussion
After upgrade from v9 to v10 "An item with the same key has already been added. Key: XXXX"
After I upgraded from v9 to v10 I got this error: "An item with the same key has already been added. Key: " and here is a stack trace
If I point the app to the test DB it starts fine, which leads me to believe its a data problem.
You can try to delete the duplicate record in [umbracoContentVersionCleanupPolicy] table
is working on a reply...
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.