Jumoo / uSyncMigrations

Rough and ready migration code.
Mozilla Public License 2.0
47 stars 62 forks source link

DTGE Grid Migration from 8 > 13 fails with "item with the same key has already been added" error #279

Open redmorello opened 3 months ago

redmorello commented 3 months ago

I've used the packer tool on my V8 site, to generate the zip file. For some reason it doesn't include the content usync files, so I've been adding those manually to the zip file.

I can run the conversion/migration on the V13 site, and import Content & Settings, and it "appears" to work, I can see the blocks in the grid in the backoffice, but when trying to render the front end, I'm getting the error "item with the same key has already been added"

ArgumentException: An item with the same key has already been added. Key: 49f4d922-c84c-4cb6-b829-d53d11d4d065 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>(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.Core.PropertyEditors.ValueConverters.BlockPropertyValueCreatorBase<TBlockModel, TBlockItemModel, TBlockLayoutItem, TBlockConfiguration>.CreateBlockModel(PropertyCacheLevel referenceCacheLevel, BlockEditorData converted, bool preview, IEnumerable<TBlockConfiguration> blockConfigurations, CreateEmptyBlockModel createEmptyModel, CreateBlockModelFromItems createModelFromItems, EnrichBlockItemModelFromConfiguration enrichBlockItem) Umbraco.Cms.Core.PropertyEditors.ValueConverters.BlockPropertyValueCreatorBase<TBlockModel, TBlockItemModel, TBlockLayoutItem, TBlockConfiguration>.CreateBlockModel(PropertyCacheLevel referenceCacheLevel, string intermediateBlockModelValue, bool preview, IEnumerable<TBlockConfiguration> blockConfigurations, CreateEmptyBlockModel createEmptyModel, CreateBlockModelFromItems createModelFromItems, EnrichBlockItemModelFromConfiguration enrichBlockItem) Umbraco.Cms.Core.PropertyEditors.ValueConverters.BlockGridPropertyValueCreator.CreateBlockModel(PropertyCacheLevel referenceCacheLevel, string intermediateBlockModelValue, bool preview, BlockGridBlockConfiguration[] blockConfigurations, Nullable<int> gridColumns) Umbraco.Cms.Core.PropertyEditors.ValueConverters.BlockGridPropertyValueConverter.ConvertIntermediateToBlockGridModel(IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object inter, bool preview) Umbraco.Cms.Core.PropertyEditors.ValueConverters.BlockGridPropertyValueConverter.ConvertIntermediateToObject(IPublishedElement owner, IPublishedPropertyType propertyType, PropertyCacheLevel referenceCacheLevel, object inter, bool preview) Umbraco.Cms.Core.Models.PublishedContent.PublishedPropertyType.ConvertInterToObject(IPublishedElement owner, PropertyCacheLevel referenceCacheLevel, object inter, bool preview) Umbraco.Cms.Infrastructure.PublishedCache.Property.GetValue(string culture, string segment) Umbraco.Extensions.BlockGridTemplateExtensions.GetBlockGridHtmlAsync(IHtmlHelper html, IPublishedContent contentItem, string propertyAlias, string template) AspNetCore.Views_ServicesOverview.ExecuteAsync() in ServicesOverview.cshtml + @await Html.GetBlockGridHtmlAsync(Model, "gridContent", "SimpleGridContent")

any ideas??