3

First some background information:

  • We're running Sitecore 8.1 rev 160302
  • We have multiple Sitecore environments (DTAP setup)
  • We have no access to the configs, nor the actual environment (only the hosting party has) but we do have full administrator access in Sitecore (so we can download files if needed but it's cumbersome)
  • We have created a SPEAK 2.0 application using the new DashboardPageStructure
  • This application works on all environments except 1
  • Default Sitecore examples for the SPEAK 2.0 dashboard also fail with the same error

It's a really weird error as it appears on every example Sitecore gives out by default, the error itself residing in the DashboardPageStructure and Glass integration. And the fact that it only appears on one environment.

I've already checked the configs and could see no differences between environments in the SPEAK specific configs, and the DLLs are also the same.

This is the error we're seeing:

Object reference not set to an instance of an object.

Description: An unhandled exception occurred. 

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error: 

Line 26:     @this.Html.Sitecore().Placeholder("Page.Internal.BeforeGrid")
Line 27:     <div class="container-narrow">
Line 28:       @this.Html.Sitecore().Placeholder("Page.Body")
Line 29:     </div>
Line 30:     @this.Html.Sitecore().Placeholder("Page.Internal.AfterGrid")

Source File: d:\AppSites\CMS\sitecore\shell\client\Speak\Layouts\Layouts\Speak-Layout.cshtml    Line: 28 

[NullReferenceException: Object reference not set to an instance of an object.]
   lambda_method(Closure , Object , Object ) +131
   Glass.Mapper.AbstractDataMapper.MapCmsToProperty(AbstractDataMappingContext mappingContext) +76
   Glass.Mapper.Configuration.<>c__DisplayClassb.<CreatePropertyExpression>b__a(Object obj, AbstractDataMappingContext context) +52

[MapperException: Failed to map property IsScriptEnabled on Sitecore.Mvc.Presentation.SpeakRenderingModel]
   Glass.Mapper.Configuration.<>c__DisplayClassb.<CreatePropertyExpression>b__a(Object obj, AbstractDataMappingContext context) +303
   Glass.Mapper.Configuration.AbstractTypeConfiguration.MapPropertiesToObject(Object obj, IAbstractService service, AbstractTypeCreationContext context) +70

[MapperException: Failed to map properties on /sitecore/client/Customer/Dashboard-Example.]
   Glass.Mapper.Configuration.AbstractTypeConfiguration.MapPropertiesToObject(Object obj, IAbstractService service, AbstractTypeCreationContext context) +229
   Glass.Mapper.Pipelines.ObjectConstruction.Tasks.CreateConcrete.CreateConcreteTask.CreateObject(ObjectConstructionArgs args) +331

[MapperException: Failed to create type Sitecore.Speak.Components.Models.Structures.Page_Structures.Application.Dashboards.DashboardRenderingModel]
   Glass.Mapper.Pipelines.ObjectConstruction.Tasks.CreateConcrete.CreateConcreteTask.CreateObject(ObjectConstructionArgs args) +496
   Glass.Mapper.Pipelines.ObjectConstruction.Tasks.CreateConcrete.CreateConcreteTask.Execute(ObjectConstructionArgs args) +147
   Glass.Mapper.Pipelines.<>c__DisplayClass3.<CreateTaskExpression>b__2(T args) +72
   Glass.Mapper.Pipelines.<>c__DisplayClass3.<CreateTaskExpression>b__2(T args) +94
   Glass.Mapper.Pipelines.<>c__DisplayClass3.<CreateTaskExpression>b__2(T args) +94
   Glass.Mapper.Pipelines.<>c__DisplayClass3.<CreateTaskExpression>b__2(T args) +94
   Glass.Mapper.Pipelines.<>c__DisplayClass3.<CreateTaskExpression>b__2(T args) +94
   Glass.Mapper.Pipelines.<>c__DisplayClass3.<CreateTaskExpression>b__2(T args) +94
   Glass.Mapper.AbstractService.InstantiateObject(AbstractTypeCreationContext abstractTypeCreationContext) +140
   Glass.Mapper.Sc.SitecoreService.CreateType(Type type, Item item, Boolean isLazy, Boolean inferType, Dictionary`2 parameters, Object[] constructorParameters) +313
   Glass.Mapper.Sc.Pipelines.Response.GetModelFromView.Process(GetModelArgs args) +669
   (Object , Object[] ) +74
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +184
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args, Func`2 resultGetter) +161
   Sitecore.Mvc.Presentation.Rendering.GetModel() +281
   Sitecore.Mvc.Presentation.Rendering.get_Model() +30
   Sitecore.Mvc.Extensions.ObjectExtensions.ValueOrDefault(T source, Func`2 resultGetter) +57
   Sitecore.Mvc.Presentation.ViewRenderer.get_Model() +150
   Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +255

[InvalidOperationException: Error while rendering view: '/sitecore/shell/client/Business Component Library/version 2/Layouts/Renderings/Structures/Page Structures/Application/Dashboards/DashboardPageStructure.cshtml'.
]
   Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +826
   Boondoggle.Sc.Pipelines.Mvc.RenderRendering.WarnableExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args) +118
   Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args) +75
   (Object , Object[] ) +74
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +184
   Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.PerformRendering.Render(String placeholderName, TextWriter writer, RenderPlaceholderArgs args) +216
   (Object , Object[] ) +74
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +184
   Sitecore.Mvc.Helpers.SitecoreHelper.Placeholder(String placeholderName) +259
   ASP._Page_sitecore_shell_client_Speak_Layouts_Layouts_Speak_Layout_cshtml.Execute() in d:\AppSites\CMS\sitecore\shell\client\Speak\Layouts\Layouts\Speak-Layout.cshtml:28
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +253
   System.Web.Mvc.WebViewPage.ExecutePageHierarchy() +148
   System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +122
   System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData) +137
   Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +343

[InvalidOperationException: Error while rendering view: '/sitecore/shell/client/Speak/Layouts/Layouts/Speak-Layout.cshtml' (model: 'Sitecore.Mvc.Presentation.RenderingModel, Sitecore.Mvc').
]
   Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +826
   Boondoggle.Sc.Pipelines.Mvc.RenderRendering.WarnableExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args) +118
   Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args) +75
   (Object , Object[] ) +74
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
   Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +184
   Sitecore.Mvc.Presentation.RenderingView.Render(ViewContext viewContext, TextWriter writer) +302
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +375
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +90
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +81
   System.Web.Mvc.Async.<>c__DisplayClass21.<BeginInvokeAction>b__1e(IAsyncResult asyncResult) +37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.