0

Sitecore 9.3

We upgraded from 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.

  • 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 – Baxter Lane Aug 19 at 23:38
  • @BaxterLane did you try the solution I posted? It worked for me. – Michael Aug 20 at 18:43
  • That worked perfectly Michael, thanks much! You rock! – Baxter Lane Aug 20 at 20:29
1

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 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>
| improve this answer | |

Your Answer

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

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