Copied to clipboard

Flag this post as spam?

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


  • SIVA PRAKASH 2 posts 102 karma points
    Jan 17, 2017 @ 05:12
    SIVA PRAKASH
    0

    An item with the same key has already been added.

    After upgrade umbraco website version 7.2.4 to 7.5.7 i got this error

    Server Error in '/' Application.

    An item with the same key has already been added.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.ArgumentException: An item with the same key has already been added.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [ArgumentException: An item with the same key has already been added.] System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) +56 System.Collections.Generic.Dictionary2.Insert(TKey key, TValue value, Boolean add) +14410285 System.Linq.Enumerable.ToDictionary(IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) +278 Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedContent.InitializeNode() +3330 Umbraco.Web.PublishedCache.XmlPublishedCache.XmlPublishedContent.get_Path() +27 Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedContentCache.AddToCacheIfDeepestRoute(UmbracoContext umbracoContext, IPublishedContent content, String route) +190 Umbraco.Web.PublishedCache.XmlPublishedCache.PublishedContentCache.GetByRoute(UmbracoContext umbracoContext, Boolean preview, String route, Nullable1 hideTopLevelNode) +286 Umbraco.Web.Routing.ContentFinderByNiceUrl.FindContent(PublishedContentRequest docreq, String route) +261 Umbraco.Web.Routing.ContentFinderByNiceUrl.TryFindContent(PublishedContentRequest docRequest) +244 System.Linq.Enumerable.Any(IEnumerable1 source, Func2 predicate) +179 Umbraco.Web.Routing.PublishedContentRequestEngine.FindPublishedContent() +542 Umbraco.Web.Routing.PublishedContentRequestEngine.FindPublishedContentAndTemplate() +299 Umbraco.Web.Routing.PublishedContentRequestEngine.PrepareRequest() +124 Umbraco.Web.UmbracoModule.ProcessRequest(HttpContextBase httpContext) +452 System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +142 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +92

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1586.0

  • Ben P 3 posts 73 karma points
    Mar 01, 2017 @ 15:43
    Ben P
    0

    Seeing the same thing here, following upgrading from 7.4.3 to 7.5.8.

    I've tried the "republish entire site" option, but this changes nothing.

  • Shola 65 posts 273 karma points
    Mar 01, 2017 @ 15:56
    Shola
    0

    What happens when you go to Developer > Health Check tab > "check all groups"?

  • Ben P 3 posts 73 karma points
    Mar 01, 2017 @ 17:03
    Ben P
    0

    There was one data integrity issue, which I fixed, but I'm still getting the same exception.

  • Shola 65 posts 273 karma points
    Mar 01, 2017 @ 20:14
  • Ben P 3 posts 73 karma points
    Mar 02, 2017 @ 12:36
    Ben P
    0

    You are a steely-eyed missile man.

    Two duplicated aliases. A couple of quick SQL update statements to change the names and my site is back!

    Thank you so much!

  • Shola 65 posts 273 karma points
    Mar 06, 2017 @ 15:45
    Shola
    0

    Glad it worked!

    If you could, please mark the answer as resolved.

    Cheers

  • SIVA PRAKASH 2 posts 102 karma points
    Mar 02, 2017 @ 13:20
    SIVA PRAKASH
    100

    The issue is that Content Master doctype has two properties with a duplicate property alias. Only the case is different. This shouldn't be the case but didn't cause any issues in prior versions of Umbraco. It is causing the error in 7.5.

    This is the query to find the duplicate property alias.

    SELECT cct.[alias], [contentTypeId], cpt.[alias], count(cpt.[Alias]) FROM [cmsPropertyType] cpt JOIN [cmsContentType] cct on cpt.contentTypeId = cct.nodeId GROUP BY cct.[alias], [contentTypeId], cpt.[alias] HAVING COUNT(cpt.[alias]) > 1

Please Sign in or register to post replies

Write your reply to:

Draft