# Fails to map Page -\> PageModel

**URL:** <https://forum.litium.com/t/fails-to-map-page-pagemodel/721>\
**Category:** Questions\
**Created:** [March 15, 2019, 5:25pm UTC](https://forum.litium.com/t/fails-to-map-page-pagemodel/721 "2019-03-15T17:25:58Z")\
**Posts on this page:** 2\
**Page:** 1

<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:** [March 15, 2019, 5:25pm UTC](https://forum.litium.com/t/fails-to-map-page-pagemodel/721/1 "2019-03-15T17:25:59Z")

</div>

For some reason, the Deployment prosses has stopped working and I’m getting a lot of these errors:

```auto
Date: 3/15/2019 5:36:56 PM
Level: ERROR
Web server: VMDEV02
Event:
Error mapping types.

Mapping types:
Page -> PageModel
Litium.Websites.Page -> Litium.Web.Administration.WebApi.Websites.ViewModels.PageModel

Type Map configuration:
Page -> PageModel
Litium.Websites.Page -> Litium.Web.Administration.WebApi.Websites.ViewModels.PageModel

Destination Member:
Location

AutoMapper.AutoMapperMappingException: Error mapping types.

Mapping types:
Page -> PageModel
Litium.Websites.Page -> Litium.Web.Administration.WebApi.Websites.ViewModels.PageModel

Type Map configuration:
Page -> PageModel
Litium.Websites.Page -> Litium.Web.Administration.WebApi.Websites.ViewModels.PageModel

Destination Member:
Location
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at Litium.Web.Administration.WebApi.Websites.ViewModels.PageModel.LocationResolver`1.Resolve(TEntity source, PageModel destination, String destMember, ResolutionContext context)
   at lambda_method(Closure , Page , PageModel , ResolutionContext )
   --- End of inner exception stack trace ---
   at lambda_method(Closure , Page , PageModel , ResolutionContext )
   at lambda_method(Closure , Object , Object , ResolutionContext )
   at AutoMapper.Mapper.AutoMapper.IMapper.Map(Object source, Type sourceType, Type destinationType) in C:\projects\automapper\src\AutoMapper\Mapper.cs:line 304
   at Litium.Runtime.AutoMapper.AutoMapperExtensions.MapTo[TResult](Object source)
   at Litium.Web.Administration.WebApi.Hubs.EventlistenerSetup.<>c.<.ctor>b__0_74(PageUpdated x)
   at Litium.Application.Events.EventBrokerImpl.<>c __DisplayClass11_1`1.<Publish>b__ 1()
   at Litium.Application.Common.FifoExecution.<>c __DisplayClass5_0.<QueueUserWorkItem>b__ 0(Object x)
   at Litium.Application.Common.FifoExecution.WorkItem.<>c.<.cctor>b__7_0(Object s)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at Litium.Application.Common.FifoExecution.WorkItem.Execute()
   at Litium.Application.Common.FifoExecution.ProcessQueuedItems(Object ignored)

```

What could be wrong? Chould it be a version missmatch in nugets ? I cant find any but have the member: “Location” resently bin added or removed?

Litium version: 7.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:** [March 16, 2019, 9:39am UTC](https://forum.litium.com/t/fails-to-map-page-pagemodel/721/2 "2019-03-16T09:39:02Z")

</div>

Not sure why it starts like that for you, and we have already identified this as a bug and will ge included in next release. You can find the bug here [https://docs.litium.com/support/bugs/bug\_details?id=45247](https://docs.litium.com/support/bugs/bug_details?id=45247)

In the scenario we found it we was deleting a page and a missing null-check is making the event that pushing the updated event to back office to fail.
