CMS 7.6 Edit page tree not loading

Vote:
 

Hi, I'm having some trouble with a site i just upgraded from CMS 7.0 to 7.6 I also ran the VppToContentMigration tool. I'm able to view the site normally without any problems but in edit and admin mode I notice some errors.

I can log in to the EPi edit/admin mode but opening the page tree I only see the root node and the loading animation, but no pages are loaded. I'm still able to enter forms edit for the page i'm on. I also noticed that on the Admin page I get the same or similar error if I click on the button to set the start page for the site(right now it's set to Start[15] but I can't change it).

In fiddler I get one error when loading the edit page:

GET http://localhost:17001/secui/cms/Stores/contentstructure/?referenceId=1&query=getchildren&typeIdentifiers=episerver.core.pagedata&allLanguages=true&sort()&dojo.preventCache=1397649417640
500 Internal Server Error (text/html)

with a stacktrace like this: 

[ArgumentException]: An item with the same key has already been added.
   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 System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector)
   at EPiServer.DataAbstraction.RuntimeModel.ContentDataInterceptor.<GetInterceptableProperties>b__5(Type t)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at EPiServer.DataAbstraction.RuntimeModel.ContentDataInterceptor.GetInterceptableProperties(Type type)
   at EPiServer.DataAbstraction.RuntimeModel.ContentDataInterceptor.IsInterceptableProperty(Type type, MethodInfo method)
   at EPiServer.DataAbstraction.RuntimeModel.ContentDataInterceptorHook.ShouldInterceptMethod(Type type, MethodInfo methodInfo)
   at Castle.DynamicProxy.Contributors.ClassMembersCollector.GetMethodToGenerate(MethodInfo method, IProxyGenerationHook hook, Boolean isStandalone)
   at Castle.DynamicProxy.Contributors.MembersCollector.AddMethod(MethodInfo method, IProxyGenerationHook hook, Boolean isStandalone)
   at Castle.DynamicProxy.Contributors.MembersCollector.AddProperty(PropertyInfo property, IProxyGenerationHook hook)
   at Castle.DynamicProxy.Contributors.MembersCollector.CollectProperties(IProxyGenerationHook hook)
   at Castle.DynamicProxy.Contributors.MembersCollector.CollectMembersToProxy(IProxyGenerationHook hook)
   at Castle.DynamicProxy.Contributors.ClassProxyTargetContributor.<CollectElementsToProxyInternal>d__2.MoveNext()
   at Castle.DynamicProxy.Contributors.CompositeTypeContributor.CollectElementsToProxy(IProxyGenerationHook hook, MetaType model)
   at Castle.DynamicProxy.Generators.ClassProxyGenerator.GenerateType(String name, Type[] interfaces, INamingScope namingScope)
   at Castle.DynamicProxy.Generators.BaseProxyGenerator.ObtainProxyType(CacheKey cacheKey, Func`3 factory)
   at Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(Type classToProxy, Type[] additionalInterfacesToProxy, ProxyGenerationOptions options, Object[] constructorArguments, IInterceptor[] interceptors)
   at Castle.Windsor.Proxy.DefaultProxyFactory.Create(IKernel kernel, Object target, ComponentModel model, CreationContext context, Object[] constructorArguments)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments)
[ComponentActivatorException]: ComponentActivator: could not proxy mysite.Models.Pages.InternationalSitePageType
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments)
   at Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context)
   at Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally)
   at Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy)
   at Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden)
   at Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired)
   at Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy)
   at Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy)
   at EPiServer.DataAbstraction.RuntimeModel.ContentDataActivator.Create(Type contentDataType)
   at EPiServer.Construction.ContentDataFactory`1.CreateInstance(Type modelType)
   at EPiServer.Construction.ContentDataFactory`1.CreateInstance(ContentType contentType)
   at EPiServer.Construction.ContentFactory.CreateInstance(ContentType contentType)
   at EPiServer.Construction.ContentFactory.CreateContent(ContentType contentType, BuildingContext buildingContext)
   at EPiServer.Construction.ContentFactory.CreateContent(ContentType contentType)
   at EPiServer.DataAccess.ContentDB.CreateContent(ContentType contentType)
   at EPiServer.DataAccess.ContentListDB.ReadPageList(DbCommand cmd)
   at EPiServer.DataAccess.ContentListDB.<>c__DisplayClass22.<LoadSpecificContentInstances>b__21()
   at EPiServer.Data.Providers.SqlDatabaseHandler.<>c__DisplayClass1`1.<Execute>b__0()
   at EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute[TResult](Func`1 method)
   at EPiServer.Data.Providers.SqlDatabaseHandler.Execute[TResult](Func`1 action)
   at EPiServer.DataAccess.ContentListDB.LoadSpecificContentInstances(Int32[] contentLinks, Int32 languageBranchID)
   at EPiServer.DataAbstraction.ContentStore.LoadSpecificContentInstances(Int32[] contentLinks, Int32 languageBranchID)
   at EPiServer.DefaultContentProvider.LoadContents(IList`1 contentReferences, ILanguageSelector selector)
   at EPiServer.Core.ContentProvider.GetScatteredContents(IEnumerable`1 contentLinks, ILanguageSelector selector)
   at EPiServer.Core.ContentProvider.LoadChildren[T](ContentReference contentLink, ILanguageSelector selector, Int32 startIndex, Int32 maxRows)
   at EPiServer.DataFactory.GetChildren[T](ContentReference contentLink, ILanguageSelector selector, Int32 startIndex, Int32 maxRows)
   at EPiServer.DataFactory.GetChildren[T](ContentReference contentLink, ILanguageSelector selector)
[TargetInvocationException]: Exception has been thrown by the target of an invocation.
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at EPiServer.Cms.Shell.UI.Rest.ContentQuery.ContentQueryBase.GetChildrenByType(Type type, ContentReference parentLink, ILanguageSelector selector)
   at EPiServer.Cms.Shell.UI.Rest.ContentQuery.GetChildrenQuery.<>c__DisplayClass6.<GetContent>b__2(Type type)
   at System.Linq.Enumerable.<SelectManyIterator>d__14`2.MoveNext()
   at System.Linq.Enumerable.<DistinctIterator>d__81`1.MoveNext()
   at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
   at System.Linq.Enumerable.Any[TSource](IEnumerable`1 source)
   at EPiServer.Cms.Shell.UI.Rest.ContentQuery.DefaultContentQueryHelper.FilterAccess(IEnumerable`1 items, AccessLevel requiredAccess)
   at EPiServer.Cms.Shell.UI.Rest.ContentQuery.ContentQueryBase.Filter(IEnumerable`1 items, ContentQueryParameters parameters)
   at EPiServer.Cms.Shell.UI.Rest.ContentQuery.GetChildrenQuery.Filter(IEnumerable`1 items, ContentQueryParameters parameters)
   at EPiServer.Cms.Shell.UI.Rest.ContentQuery.ContentQueryBase.ExecuteQuery(IQueryParameters parameters)
   at EPiServer.Cms.Shell.UI.Rest.ContentStructureStore.Get(ContentReference id, String query, ContentReference referenceId, String[] typeIdentifiers, Nullable`1 allLanguages, IEnumerable`1 sortColumns, ItemRange range)
   at lambda_method(Closure , ControllerBase , Object[] )
   at System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass13.<InvokeActionMethodWithFilters>b__10()
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation)
   at System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodWithFilters(ControllerContext controllerContext, IList`1 filters, ActionDescriptor actionDescriptor, IDictionary`2 parameters)
   at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
   at EPiServer.Shell.Services.Rest.RestControllerBase.ExecuteCore()
   at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
   at EPiServer.Shell.Services.Rest.RestHttpHandler.ProcessRequest(HttpContextBase httpContext)
   at EPiServer.Shell.Services.Rest.RestHttpHandler.ProcessRequest(HttpContext context)
   at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
   at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

    

Clicking on set start page on the edit website page in admin mode i get this:

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.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) +14119204
   System.Linq.Enumerable.ToDictionary(IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer) +267
   System.Linq.Enumerable.ToDictionary(IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector) +90
   System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) +83
   EPiServer.DataAbstraction.RuntimeModel.ContentDataInterceptor.IsInterceptableProperty(Type type, MethodInfo method) +188
   Castle.DynamicProxy.Contributors.ClassMembersCollector.GetMethodToGenerate(MethodInfo method, IProxyGenerationHook hook, Boolean isStandalone) +261
   Castle.DynamicProxy.Contributors.MembersCollector.AddMethod(MethodInfo method, IProxyGenerationHook hook, Boolean isStandalone) +136
   Castle.DynamicProxy.Contributors.MembersCollector.AddProperty(PropertyInfo property, IProxyGenerationHook hook) +77
   Castle.DynamicProxy.Contributors.MembersCollector.CollectProperties(IProxyGenerationHook hook) +80
   Castle.DynamicProxy.Contributors.MembersCollector.CollectMembersToProxy(IProxyGenerationHook hook) +32
   Castle.DynamicProxy.Contributors.<CollectElementsToProxyInternal>d__2.MoveNext() +286
   Castle.DynamicProxy.Contributors.CompositeTypeContributor.CollectElementsToProxy(IProxyGenerationHook hook, MetaType model) +680
   Castle.DynamicProxy.Generators.ClassProxyGenerator.GenerateType(String name, Type[] interfaces, INamingScope namingScope) +186
   Castle.DynamicProxy.Generators.BaseProxyGenerator.ObtainProxyType(CacheKey cacheKey, Func`3 factory) +757
   Castle.DynamicProxy.ProxyGenerator.CreateClassProxy(Type classToProxy, Type[] additionalInterfacesToProxy, ProxyGenerationOptions options, Object[] constructorArguments, IInterceptor[] interceptors) +184
   Castle.Windsor.Proxy.DefaultProxyFactory.Create(IKernel kernel, Object target, ComponentModel model, CreationContext context, Object[] constructorArguments) +633
   Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments) +432

[ComponentActivatorException: ComponentActivator: could not proxy ForumSyd.Models.Pages.InternationalSitePageType]
   Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.CreateInstance(CreationContext context, ConstructorCandidate constructor, Object[] arguments) +887
   Castle.MicroKernel.ComponentActivator.DefaultComponentActivator.InternalCreate(CreationContext context) +30
   Castle.MicroKernel.ComponentActivator.AbstractComponentActivator.Create(CreationContext context, Burden burden) +27
   Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.CreateInstance(CreationContext context, Boolean trackedExternally) +57
   Castle.MicroKernel.Lifestyle.AbstractLifestyleManager.Resolve(CreationContext context, IReleasePolicy releasePolicy) +29
   Castle.MicroKernel.Handlers.DefaultHandler.ResolveCore(CreationContext context, Boolean requiresDecommission, Boolean instanceRequired, Burden& burden) +282
   Castle.MicroKernel.Handlers.DefaultHandler.Resolve(CreationContext context, Boolean instanceRequired) +35
   Castle.MicroKernel.DefaultKernel.ResolveComponent(IHandler handler, Type service, IDictionary additionalArguments, IReleasePolicy policy) +149
   Castle.MicroKernel.DefaultKernel.Castle.MicroKernel.IKernelInternal.Resolve(Type service, IDictionary arguments, IReleasePolicy policy) +74
   EPiServer.DataAbstraction.RuntimeModel.ContentDataActivator.Create(Type contentDataType) +127
   EPiServer.Construction.ContentDataFactory`1.CreateInstance(Type modelType) +86
   EPiServer.Construction.ContentFactory.CreateInstance(ContentType contentType) +78
   EPiServer.Construction.ContentFactory.CreateContent(ContentType contentType, BuildingContext buildingContext) +46
   EPiServer.DataAccess.ContentDB.CreateContent(ContentType contentType) +20
   EPiServer.DataAccess.ContentListDB.ReadPageList(DbCommand cmd) +706
   EPiServer.DataAccess.<>c__DisplayClass22.<LoadSpecificContentInstances>b__21() +604
   EPiServer.Data.Providers.<>c__DisplayClass1`1.<Execute>b__0() +60
   EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute(Func`1 method) +150
   EPiServer.DefaultContentProvider.LoadContents(IList`1 contentReferences, ILanguageSelector selector) +602
   EPiServer.Core.ContentProvider.GetScatteredContents(IEnumerable`1 contentLinks, ILanguageSelector selector) +459
   EPiServer.Core.ContentProvider.LoadChildren(ContentReference contentLink, ILanguageSelector selector, Int32 startIndex, Int32 maxRows) +538
   EPiServer.DataFactory.GetChildren(ContentReference contentLink, ILanguageSelector selector, Int32 startIndex, Int32 maxRows) +1441
   EPiServer.DataFactory.GetChildren(ContentReference contentLink, ILanguageSelector selector) +89
   EPiServer.Web.WebControls.PageDataSource.GetChildrenForLoader(PageReference pageLink) +124
   EPiServer.Web.WebControls.HierarchicalPageLoader.GetFilteredChildren(PageReference pageLink) +115
   EPiServer.Web.WebControls.PageHierarchyData.GetChildren() +63
   EPiServer.UI.WebControls.PageTreeView.PopulateChildNodes(IHierarchicalEnumerable enumerable, Int32 depth, Int32 expandDepth, PageTreeNode parentNode, ArrayList populationPath) +814
   EPiServer.UI.WebControls.PageTreeView.PopulateRecursive(String viewPath) +466
   EPiServer.UI.WebControls.PageTreeView.PerformDataBinding() +170
   System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect() +104
   System.Web.UI.Control.LoadRecursive() +71
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Control.LoadRecursive() +190
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3178

 

Does anyone have any clue to what this can be caused by?

 

Regards

/Jonas

#85170
Apr 16, 2014 14:07
Vote:
 

Could it be the same as this: http://world.episerver.com/Modules/Forum/Pages/Thread.aspx?id=85177&epslanguage=en ?

#85210
Apr 16, 2014 22:54
Vote:
 

Thanks for your answer Erik, I looked at this but I can't find any duplicates, not sure if I'm looking in all the relevant places though. 

I'm able to create new blocks, but not new pages, I can click create new page and enter a name for it, but I don't get any suggested pagetypes so I can't complete the creation.

In admin mode database information I can see "Total number of pages in database 2467" so apparantly something is found. And under content type I can see all my page, block, media and system types. I was also able to create a copy of my startpage type but I still couldn't create any page even based on that.

 

#85240
Apr 17, 2014 16:37
Vote:
 

I'm having the same problem, did you manage to solve this Jonas?

#89988
Aug 30, 2014 22:18
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.