0

I am using Sitecore 9 with SXA 1.7. When I try to open page in Experience Editor, I got the below error. Any suggestions?


Error Rendering View: /Views/SxaLayout/SxaLayout.cshtml: Error while rendering view: '/Views/SxaLayout/SxaLayout.cshtml' (model: 'Sitecore.Mvc.Presentation.RenderingModel, Sitecore.Mvc').
   at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer)
   at Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args)

Inner Exception: Object reference not set to an instance of an object.
   at Sitecore.XA.Foundation.Grid.Commands.ShowGridPropertiesDialog.QueryState(CommandContext context)
   at Sitecore.Shell.Framework.Commands.CommandManager.QueryState(Command command, CommandContext context)
   at Sitecore.Pipelines.GetChromeData.GetChromeDataProcessor.QueryButtonState(WebEditButton button, CommandContext context, String click)
   at Sitecore.Pipelines.GetChromeData.GetChromeDataProcessor.AddButtonToChromeData(WebEditButton button, GetChromeDataArgs args)
   at Sitecore.Pipelines.GetChromeData.GetChromeDataProcessor.AddButtonsToChromeData(IEnumerable`1 buttons, GetChromeDataArgs args)
   at Sitecore.Pipelines.GetChromeData.GetRenderingChromeData.Process(GetChromeDataArgs args)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Pipelines.GetChromeData.GetChromeDataPipeline.Run(GetChromeDataArgs args)
   at Sitecore.Mvc.ExperienceEditor.Presentation.RenderingMarker.GetClientData()
   at Sitecore.Mvc.ExperienceEditor.Presentation.RenderingMarker.get_ClientData()
   at Sitecore.Mvc.ExperienceEditor.Presentation.RenderingMarker.GetStart()
   at Sitecore.Mvc.ExperienceEditor.Presentation.Wrapper..ctor(TextWriter writer, IMarker marker)
   at Sitecore.Mvc.ExperienceEditor.Pipelines.Response.RenderRendering.AddWrapper.Process(RenderRenderingArgs args)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
   at Sitecore.Mvc.Pipelines.Response.RenderPlaceholder.PerformRendering.Render(String placeholderName, TextWriter writer, RenderPlaceholderArgs args)
   at (Object , Object[] )
   at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
   at Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain)
   at Sitecore.Mvc.Pipelines.PipelineService.RunPipeline[TArgs](String pipelineName, TArgs args)
   at Sitecore.Mvc.Helpers.SitecoreHelper.Placeholder(String placeholderName)
   at ASP._Page_Views_SxaLayout_BootstrapBody_cshtml.Execute() in c:\inetpub\wwwroot\sitecore9\Views\SxaLayout\BootstrapBody.cshtml:line 20
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
   at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
   at Sitecore.XA.Foundation.SitecoreExtensions.Services.RazorService.GetRazorViewAsString(Object model, String filePath)
   at Sitecore.XA.Foundation.Grid.Extensions.GridExtensions.GridBody(RazorExtensions helper)
   at ASP._Page_Views_SxaLayout_SxaLayout_cshtml.Execute() in c:\inetpub\wwwroot\sitecore9.sc\Views\SxaLayout\SxaLayout.cshtml:line 32
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
   at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
   at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
   at System.Web.Mvc.Html.PartialExtensions.Partial(HtmlHelper htmlHelper, String partialViewName, Object model, ViewDataDictionary viewData)
   at Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer)

2
  • What is on that page? Do you have there any custom renderings or just standard SXA ones? Did you modify any SXA grid settings? Are you using a custom grid? Commented Jun 1, 2018 at 17:35
  • I have had that error as well, that is quite generic, but unfortunately not verbose description. In my case the reason was caused by rendering parameters template missing out due not being serialized thus not synced on that new environment. I described the issue and troubleshooting it in a blog post, maybe it helps someone: goo.gl/rrkfKc Commented Feb 14, 2019 at 10:26

3 Answers 3

2

From Error, It seems that there is some issue with the component you have added.

Remove all the component you have added using page design or change the page design to Default one. And if page loads for you in experience editor with Default page design then there must be some issue with you component configuration.

Your error is locating the Main placeholder. If you have used partial design for main container then remove that specific partial design and try to view the page.

It should work fine, if you haven't faced any issue during installation of SXA and site creation.

3

I have seen this happen when the Experience Editor cannot resolve the site correctly. Things to look for:

  • Make sure that your Site Grouping has the correct URL in for both the CD and the CM urls. So maybe something like www.mysite.com|cms.mysite.com
  • Make sure you are using the right url to edit the site if you have a multi-site setup

You can test this by going to the same page item in the Content Explorer, right click and go to the Experience Editor from that menu. If that works, it is the site resolving that is going wrong.

0

I have got this error when Parameters Template field on Controller Rendering had the wrong value(broken link).

It worth checking all renderings on your page. One of the renderings causes this issue. (because of something is broken on rendering itself). You need to isolate issue by figuring out, which rendering is broken. And then troubleshooting what is broken on that rendering is a much more simple task.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.