Glass Mapper and Sitecore 9.3 Upgrading Issues

Life at Apollo Division
Life at Apollo Division
2 min readJul 22, 2020
Photo by Max Duzij on Unsplash

On one of our Sitecore based projects, we initiated an upgrade from Sitecore 9.2 to Sitecore 9.3. Upgrade was straightforward, with one exception.

The original project was using Glass.Mapper in its 9.2 version (5.5.28), and during upgrade we updated Glass.Mapper to its 9.3 version 5.6.160, including the takeover of original, vanilla, configuration files.

The following exception was … little bit unwanted result of the upgrade process.

22248 11:45:18 WARN Could not find constructor in ReflectionUtil.CreateObject: Glass.Mapper.Sc.Pipelines.GetChromeData.EditFrameBuilder. The constructor parameters may not match or it may be an abstract class.
Parameter info: Count: 0

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:

1. <getChromeData>

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

3. </getChromeData>

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

1. <getChromeData>

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

3. </getChromeData>

We are ACTUM Digital and this piece was written by Tomas Knaifl, Senior .NET Developer of Apollo Division. Feel free to get in touch.

--

--