# Not able to open the left tree which lists pages

**URL:** https://forum.litium.com/t/not-able-to-open-the-left-tree-which-lists-pages/520
**Category:** Questions
**Tags:** litium-7
**Created:** [January 23, 2019, 10:47am UTC](https://forum.litium.com/t/not-able-to-open-the-left-tree-which-lists-pages/520 "2019-01-23T10:47:24Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![jinesh](https://avatars.discourse-cdn.com/v4/letter/j/3e96dc/32.png) [@jinesh](https://forum.litium.com/u/jinesh)
#### Post date: [January 23, 2019, 10:47am UTC](https://forum.litium.com/t/not-able-to-open-the-left-tree-which-lists-pages/520/1 "2019-01-23T10:47:24Z")

</div>

_Not able to open the left tree which lists pages. I couldn’t find any error from event log/console  
But I’m able to reach pages through sub pages option while in edit mode_  
 ![tree](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/41daad30bc575b03e79c661485578b60b8478cd8.jpeg)  
Litium version: _7.0.2_

---

<div class="post-metadata">

### Author: ![Robin.w](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/robin.w/32/75_2.png) [@Robin.w](https://forum.litium.com/u/Robin.w)
#### Post date: [January 23, 2019, 10:58am UTC](https://forum.litium.com/t/not-able-to-open-the-left-tree-which-lists-pages/520/2 "2019-01-23T10:58:09Z")

</div>

I’m dealing with the same thing, you should see the error in the network tab.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/590a6923580a2185a66cf28e1d5e19fda39f1312.png)

If you expand this you should see.

`{"message":"An error has occurred.","exceptionMessage":"Error mapping types.\r\n\r\nMapping types:\r\nPage -> PageTreeViewModel\r\nLitium.Websites.Page -> Litium.Web.Administration.WebApi.Websites.ViewModels.PageTreeViewModel\r\n\r\nType Map configuration:\r\nPage -> PageTreeViewModel\r\nLitium.Websites.Page -> Litium.Web.Administration.WebApi.Websites.ViewModels.PageTreeViewModel\r\n\r\nProperty:\r\nHasChildren","exceptionType":"AutoMapper.AutoMapperMappingException","stackTrace":" at lambda_method(Closure , Page , PageTreeViewModel , ResolutionContext )\r\n at lambda_method(Closure , Object , Object , ResolutionContext )\r\n at Litium.Runtime.AutoMapper.AutoMapperExtensions.MapTo[TResult](Object source)\r\n at Litium.Web.Administration.WebApi.Websites.Controllers.PageController.<>c.<GetPageModelList>b__34_3(Page c)\r\n at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()\r\n at System.Linq.Enumerable.d\_\_59`1.MoveNext()\r\n at System.Collections.Generic.List`1…ctor(IEnumerable`1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n at Litium.Web.Administration.WebApi.Websites.Controllers.PageController.Treeview(Guid systemId, Boolean includeContainer, Boolean sort)\r\n at lambda\_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.\<\>c\_\_DisplayClass6\_2.b\_\_2(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__17`1.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.d\_\_1.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Tracing.ITraceWriterExtensions.d\_\_17`1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__3.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Tracing.Tracers.HttpControllerTracer.<ExecuteAsyncCore>d__10.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Tracing.ITraceWriterExtensions.<TraceBeginEndAsyncCore>d__17`1.MoveNext()\r\n— End of stack trace from previous location where exception was thrown —\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.d\_\_15.MoveNext()",“innerException”:{"$type":“System.Web.Http.HttpError, System.Web.Http”,“message”:“An error has occurred.”,“exceptionMessage”:“Error mapping types.\r\n\r\nMapping types:\r\nPageEntity -\> Page\r\nLitium.Application.Websites.Data.PageEntity -\> Litium.Websites.Page\r\n\r\nType Map configuration:\r\nPageEntity -\> Page\r\nLitium.Application.Websites.Data.PageEntity -\> Litium.Websites.Page\r\n\r\nProperty:\r\nItem”,“exceptionType”:“AutoMapper.AutoMapperMappingException”,“stackTrace”:" at lambda\_method(Closure , PageEntity , Page , ResolutionContext )\r\n at lambda\_method(Closure , Object , Object , ResolutionContext )\r\n at Litium.Application.Caching.CacheLoader.\<\>c\_\_DisplayClass4\_1`3.<LoadByPrimaryKey>b__1(TValueEntity x)\r\n at System.Linq.Enumerable.WhereSelectListIterator`2.MoveNext()\r\n at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)\r\n at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)\r\n at Litium.Application.Caching.CacheLoader.<>c__DisplayClass4_0`3.b\_\_0(LitiumDbContext db)\r\n at Litium.Application.Data.DbContextExtension.ExecuteInDbContext[T](IServiceProvider serviceProvider, Func`2 loaderFunc)\r\n at Litium.Application.Caching.CacheLoader.LoadByPrimaryKey[TKey,TValue,TValueEntity](IEnumerable`1 keys, Expression`1 keyEntityProperty)\r\n at Litium.Application.Caching.EntityCache`2.TryLoadItems(IEnumerable`1 keys)\r\n at Litium.Application.Caching.EntityCache`2.Get(IEnumerable`1 key)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at lambda_method(Closure , Exception )\r\n at Litium.Application.Runtime.ExceptionEnlightenment.PrepareForRethrow(Exception exception)\r\n at Litium.Application.Runtime.ExceptionHelpers.PrepareForRethrow(Exception exception)\r\n at Litium.Application.Caching.EntityCache`2.LoadableCacheItem.SetException(Exception exception)\r\n at Litium.Application.Caching.EntityCache`2.Get(IEnumerable`1 key)\r\n at Litium.Application.Caching.EntityReferenceCacheImpl`3.Get(TKey key)\r\n at Litium.Application.Websites.PageServiceImpl.GetChildPages(Guid parentPageSystemId, Nullable`1 websiteSystemId)\r\n at Litium.Web.Administration.WebApi.Websites.ViewModels.PageTreeViewModel.HasChildrenAvailableResolver.Resolve(Page page, PageTreeViewModel pageModel, Boolean destMember, ResolutionContext context)\r\n at lambda\_method(Closure , Page , PageTreeViewModel , ResolutionContext )",“innerException”:{"$type":“System.Web.Http.HttpError, System.Web.Http”,“message”:“An error has occurred.”,“exceptionMessage”:“Field with name ‘ErrorMessage’ does not match any field definition in area ‘WebsiteArea’.”,“exceptionType”:“Litium.FieldFramework.FieldFrameworkException”,“stackTrace”:" at Litium.Application.AutoMapper.ValueResolvers.FieldDataToFieldDataContainerItemValueReolver`4.Resolve(TDataEntity source, T destination, ICollection`1 sourceMember, FieldContainer destMember, ResolutionContext context)\r\n at lambda\_method(Closure , PageEntity , Page , ResolutionContext )"}}}`

---

<div class="post-metadata">

### Author: ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)
#### Post date: [January 23, 2019, 11:10am UTC](https://forum.litium.com/t/not-able-to-open-the-left-tree-which-lists-pages/520/3 "2019-01-23T11:10:02Z")

</div>

To be able to help out and debug the issue you have to open a support case with [support@litium.com](mailto:support@litium.com) where you provide link to where we can get access to your code and a database backup.

---

<div class="post-metadata">

### Author: ![Robin.w](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/robin.w/32/75_2.png) [@Robin.w](https://forum.litium.com/u/Robin.w)
#### Post date: [January 23, 2019, 10:30pm UTC](https://forum.litium.com/t/not-able-to-open-the-left-tree-which-lists-pages/520/4 "2019-01-23T22:30:21Z")

</div>

I fixed my code, don’t know exactly how 🙂  
Thanks!

---

<div class="post-metadata">

### Author: ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)
#### Post date: [January 24, 2019, 9:29am UTC](https://forum.litium.com/t/not-able-to-open-the-left-tree-which-lists-pages/520/5 "2019-01-24T09:29:17Z")

</div>

I have been able to find an bug (44891) during the execution of the migration script. The error is because of property names with `-` not is migrated correctly.

To fix this in your upgraded database you can run the following sql command.

```auto
UPDATE
	Sites.PageFieldData 
SET 
	FieldDefinitionId = Replace(Replace(FieldDefinitionId, '-', ''), ' ', '_'), 
	ChildOwnerId = Replace(Replace(ChildOwnerId, '-', ''), ' ', '_')
WHERE
	FieldDefinitionId LIKE '%-%' 
	OR ChildOwnerId LIKE '%-%';

```

If you want to validate if it exists some other fields that have wrong name you can use the following script that will print them out

```auto
SELECT FD.*
FROM Sites.PageFieldData FD
LEFT JOIN FieldFramework.FieldDefinition F ON F.Id = FD.FieldDefinitionId
LEFT JOIN FieldFramework.FieldDefinition F2 ON F2.Id = FD.ChildOwnerId
WHERE
	(F.Id IS NULL OR (FD.ChildOwnerId <> '' AND F2.Id IS NULL))
	AND NOT SUBSTRING(FD.FieldDefinitionId, 1, 1) = '_'

```

---

<div class="post-metadata">

### Author: ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)
#### Post date: [January 24, 2019, 9:30am UTC](https://forum.litium.com/t/not-able-to-open-the-left-tree-which-lists-pages/520/6 "2019-01-24T09:30:28Z")

</div>

Another part that can be an issue in solutions is when the same package is used in different versions in the installation. You will easy find them in the `NuGet - Solution` view in the below tab.  
 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/e55e69b6cdee5f96e86450c062e55ed7520de761.png)

---

<div class="post-metadata">

### Author: ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)
#### Post date: [January 24, 2019, 9:44am UTC](https://forum.litium.com/t/not-able-to-open-the-left-tree-which-lists-pages/520/7 "2019-01-24T09:44:38Z")

</div>

> [@Robin.w](#):
>
> you should see the error in the network tab.

If you go into _settings \ system settings \ web log_ and you will see a **nice** error message.

---

<div class="post-metadata">

### Author: ![jinesh](https://avatars.discourse-cdn.com/v4/letter/j/3e96dc/32.png) [@jinesh](https://forum.litium.com/u/jinesh)
#### Post date: [January 24, 2019, 12:05pm UTC](https://forum.litium.com/t/not-able-to-open-the-left-tree-which-lists-pages/520/8 "2019-01-24T12:05:55Z")

</div>

The query updated no rows. Consolidate update didn’t fixed as well

---

<div class="post-metadata">

### Author: ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)
#### Post date: [January 24, 2019, 12:28pm UTC](https://forum.litium.com/t/not-able-to-open-the-left-tree-which-lists-pages/520/9 "2019-01-24T12:28:46Z")

</div>

If you go into this view, what is that saying?

> _settings \ system settings \ web log_

Do you get any rows back with the select-command?

```auto
SELECT FD.*
FROM Sites.PageFieldData FD
LEFT JOIN FieldFramework.FieldDefinition F ON F.Id = FD.FieldDefinitionId
LEFT JOIN FieldFramework.FieldDefinition F2 ON F2.Id = FD.ChildOwnerId
WHERE
	(F.Id IS NULL OR (FD.ChildOwnerId <> '' AND F2.Id IS NULL))
	AND NOT SUBSTRING(FD.FieldDefinitionId, 1, 1) = '_'

```

---

<div class="post-metadata">

### Author: ![jinesh](https://avatars.discourse-cdn.com/v4/letter/j/3e96dc/32.png) [@jinesh](https://forum.litium.com/u/jinesh)
#### Post date: [January 25, 2019, 3:54am UTC](https://forum.litium.com/t/not-able-to-open-the-left-tree-which-lists-pages/520/10 "2019-01-25T03:54:50Z")

</div>

> [@patric.forsgard](#):
>
> SELECT FD.\* FROM Sites.PageFieldData FD LEFT JOIN FieldFramework.FieldDefinition F ON F.Id = FD.FieldDefinitionId LEFT JOIN FieldFramework.FieldDefinition F2 ON F2.Id = FD.ChildOwnerId WHERE (F.Id IS NULL OR (FD.ChildOwnerId \<\> ‘’ AND F2.Id IS NULL)) AND NOT SUBSTRING(FD.FieldDefinitionId, 1, 1) = ‘\_’

It doesn’t return any rows. I checked event log as well, as soon i clicked on tree node. But couldn’t find anything there as well. But got the below error from console

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/f6fb566936a7392c1bab370a273191c06cdec36f.png)  
The first error is fine, its due to a code issue while previewing page.  
The second error says net::ERR\_CONNECTION\_RESET

---

<div class="post-metadata">

### Author: ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)
#### Post date: [January 25, 2019, 7:56am UTC](https://forum.litium.com/t/not-able-to-open-the-left-tree-which-lists-pages/520/11 "2019-01-25T07:56:33Z")

</div>

What’s the weblog-saying?

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/5c908cba105552a4d9d874c55ed0fc2be5cf35e3.png)

The database that you provided in the support ticket is working with your code after I run the above SQL script. So little hard to get advise about whats wrong.

---

<div class="post-metadata">

### Author: ![jinesh](https://avatars.discourse-cdn.com/v4/letter/j/3e96dc/32.png) [@jinesh](https://forum.litium.com/u/jinesh)
#### Post date: [January 25, 2019, 8:11am UTC](https://forum.litium.com/t/not-able-to-open-the-left-tree-which-lists-pages/520/12 "2019-01-25T08:11:12Z")

</div>

I did an upgrade on fresh DB, and executed the update query that you send above.  
Now it works fine.  
I guess, some weird thing happened to old DB, while I tried to upgrade it (May be while renaming field definition)
