Just updated a simple instance of Sitecore 8.1 to 8.2, the actual solution contains a simple demo, some templates, items, nothing too complex. All went fine as I followed all the steps from the upgrade document but now when I try to get into Sitecore I get the following:
Attempt by method 'Glass.Mapper.Sc.Utilities.get_IsPageEditor()' to access method 'Sitecore.Context+PageMode.get_IsPageEditor()' failed.
Is there a fix for this error somewhere? from the details below it seems to be from Glass and not Sitecore or my code.
EDIT:
After I removed all Glass packages from packages folder, removed entries from packages.config
, removed all configs and then reinstalled a clean version of Glass.Mapper.SC
and Glass.Mapper.Sc.MVC-5 via nuget on my solution now I get:
Could not resolve type name: Glass.Mapper.Sc.Pipelines.Response.GetModelFromView, Glass.Mapper.Sc.Mvc (method: Sitecore.Configuration.DefaultFactory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)).
I checked with dotPeek and indeed there isn't such method, but not sure why then there is this entry in Glass config:
<mvc.getModel>
<processor patch:before="*[@type='Sitecore.Mvc.Pipelines.Response.GetModel.GetFromItem, Sitecore.Mvc']" type="Glass.Mapper.Sc.Pipelines.Response.GetModel, Glass.Mapper.Sc.Mvc"/>
<processor patch:before="*[@type='Sitecore.Mvc.Pipelines.Response.GetModel.GetFromItem, Sitecore.Mvc']" type="Glass.Mapper.Sc.Pipelines.Response.GetModelFromView, Glass.Mapper.Sc.Mvc"/>
</mvc.getModel>
Then if I remove this again from config I get another error:
Method not found: 'Glass.Mapper.Sc.SitecoreContext Glass.Mapper.Sc.SitecoreContext.GetFromHttpContext(System.String)'.
Did anyone managed to have Glass working on a Sitecore 8.2 solution? I am not sure what else can I do to make it work fine.
My package entries:
<package id="Glass.Mapper.Sc" version="4.2.1.188" targetFramework="net452" />
<package id="Glass.Mapper.Sc.Core" version="4.2.1.188" targetFramework="net452" />
<package id="Glass.Mapper.Sc.Mvc-5" version="3.3.1.48" targetFramework="net452" />
Glass.Mapper.Sc.Mvc.config:
<sitecore>
<settings></settings>
<pipelines>
<mvc.getModel>
<processor type="Glass.Mapper.Sc.Pipelines.Response.GetModel, Glass.Mapper.Sc.Mvc" />
</mvc.getModel>
</pipelines>
</sitecore>
Glass.Mapper.Sc.config:
<sitecore>
<settings></settings>
<pipelines>
<mvc.getModel>
<processor patch:before="*[@type='Sitecore.Mvc.Pipelines.Response.GetModel.GetFromItem, Sitecore.Mvc']" type="Glass.Mapper.Sc.Pipelines.Response.GetModel, Glass.Mapper.Sc.Mvc" />
<processor patch:before="*[@type='Sitecore.Mvc.Pipelines.Response.GetModel.GetFromItem, Sitecore.Mvc']" type="Glass.Mapper.Sc.Pipelines.Response.GetModelFromView, Glass.Mapper.Sc.Mvc" />
</mvc.getModel>
<getChromeData>
<processor type="Glass.Mapper.Sc.Pipelines.GetChromeData.EditFrameBuilder, Glass.Mapper.Sc" patch:before="processor[1]" />
</getChromeData>
</pipelines>
<events>
<event name="publish:end">
<handler type="Glass.Mapper.Sc.Events.PublishEnd.GlassCacheClear, Glass.Mapper.Sc" method="ClearCache" />
</event>
<event name="publish:end:remote">
<handler type="Glass.Mapper.Sc.Events.PublishEnd.GlassCacheClear, Glass.Mapper.Sc" method="ClearCache" />
</event>
</events>
</sitecore>