INTRODUCTION
I’m doing an upgrade from Sitecore 8.0 to 8.2 Update 4 and the solution was using Glass.Mapper.
The upgrade went well except when I tried to access Sitecore, I get the error saying that:
Glass.Mapper.Sc.Utilities.get_IsPageEditor()
no longer exists. Basically GlassMapper tried to access the Get property of Sitecore’s PageMode.IsEditor which has now been set to private in 8.2 Update 4.
I also used GlassMapper’s latest version, which as of the writing of this article, was v4.4.0.199.
RESOLUTION
I think this was a GlassMapper build issue because I downgraded to v4.2.1.188 and all was well!
I used dotPeek to look at the source code and the v4.2.1.188 was using
public static bool IsPageEditor
{
get
{
return Context.PageMode.get_IsExperienceEditor();
}
}
which was correct.
Hope this helps,
Tommy