1

Sitecore 9.3

We upgraded from Sitecore 8.2.3 by installing vanilla 9.3 on a server and applying our update to it. When I try to view any page in experience editor I get the error

Error Rendering View: ~/Areas/Dkg/Views/Layouts/StandardLayout.cshtml: Error while rendering view: '~/Areas/Dkg/Views/Layouts/StandardLayout.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: Could not create instance of type: Glass.Mapper.Sc.Pipelines.GetChromeData.EditFrameBuilder. No matching constructor was found.

This happens at line 165 which is:

@Html.Sitecore().Placeholder("herocontent")

Preview works and the page displays ok when published.

3
  • I received the same error, but only in the Experience Editor. This is a clean 930 greenfield install with a very simple example page. 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: Could not create instance of type: Glass.Mapper.Sc.Pipe Aug 19, 2020 at 23:38
  • @BaxterLane did you try the solution I posted? It worked for me.
    – Michael
    Aug 20, 2020 at 18:43
  • That worked perfectly Michael, thanks much! You rock! Aug 20, 2020 at 20:29

1 Answer 1

3

Sitecore support directed me to the answer here: https://www.sitecoreblog.cz/en/glass-mapper-and-sitecore-9-3-upgrading-issues/

Here are the important parts of the article: The issue is caused by the fact, that the constructor of Glass.Mapper.Sc.Pipelines.GetChromeData .EditFrameBuilder was extended in 9.3 version by an injected instance of BaseClient abstract class, but dependency injection was not enabled for this pipeline processor.

This dependency is controlled by resolve=true attribute on the processor definition, so the solution is very straightforward – locate your Glass.Mapper.Sc.config file, and the line, which will look similar to the following:

<getChromeData>
        <processor type="Glass.Mapper.Sc.Pipelines.GetChromeData.EditFrameBuilder, Glass.Mapper.Sc" patch:before="processor[1]" />
</getChromeData>

should be extended by resolve=true attribute. After the change, it can look like this:

<getChromeData>
        <processor type="Glass.Mapper.Sc.Pipelines.GetChromeData.EditFrameBuilder, Glass.Mapper.Sc" patch:before="processor[1]" resolve="true" />
</getChromeData>

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.