サブアイテムと関連アイテムを含む Sitecore テンプレートのパブリッシュ中に、「System.ArgumentException」エラーが発生する場合があります。
[Error] Error in the VariantsValidationTargetProducer
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer)
at Sitecore.Framework.Publishing.ManifestCalculation.VariantsValidationTargetProducer.CandidatePromotionContext.CalculatePublishActions(Boolean replaceUnmodifedVariants)
at Sitecore.Framework.Publishing.ManifestCalculation.VariantsValidationTargetProducer.Emit(CandidatePromotionContext context)
at Sitecore.Framework.Publishing.ManifestCalculation.VariantsValidationTargetProducer.ProcessCandidate(CandidatePromotionContext context)
at Sitecore.Framework.Publishing.ManifestCalculation.VariantsValidationTargetProducer.<Initialize>b__12_0(IList`1 ctxs)
本問題は、Sitecore Publishing Serviceバージョン 2.2 Update-1 ~ 3.1 Update-2、およびバージョン 4.0.0で発生します。
本問題を解決するには、次のオプションのいずれかを検討してください。
https://github.com/SitecoreSupport/Sitecore.Support.40925/releases