4

I am attempting an update from Sitecore 8.1 Initial to 8.2 Update 3 and after running the update package and showing normal warnings on the update, I am getting the below error.

I have already updated my version of GlassMapper so I am running version v4.3.4.197 Not quite sure what is going on. I am using 4.6.2 .Net Framework also.

Using dotPeek I see that GlassMapper 4.3.4.197 does not have IsExperienceEditor which is the only choice in Sitecore 8.2 Update 3.

Server Error in '/' Application.

Method not found: 'Boolean PageMode.get_IsPageEditor()'.

Description: An unhandled exception occurred.

Exception Details: System.MissingMethodException: Method not found: 'Boolean PageMode.get_IsPageEditor()'.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[MissingMethodException: Method not found: 'Boolean PageMode.get_IsPageEditor()'.]
Glass.Mapper.Sc.Utilities.get_IsPageEditor() in c:\TeamCity\buildAgent\work\8567e2ba106d3992\Source\Glass.Mapper.Sc\Utilities.cs:54 Glass.Mapper.Sc.SitecoreService.Initiate(IDependencyResolver resolver) in c:\TeamCity\buildAgent\work\8567e2ba106d3992\Source\Glass.Mapper.Sc\SitecoreService.cs:111 Glass.Mapper.Sc.IoC.SitecoreContextFactory.GetSitecoreContext(Context context) in c:\TeamCity\buildAgent\work\8567e2ba106d3992\Source\Glass.Mapper.Sc\IoC\SitecoreContextFactory.cs:63 Glass.Mapper.Sc.Pipelines.Response.GetModelFromView.Process(GetModelArgs args) in c:\TeamCity\buildAgent\work\8567e2ba106d3992\Source\Glass.Mapper.Sc.Mvc\Pipelines\Response\GetModelFromView.cs:91 (Object , Object[] ) +74
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +196
Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args, Func2 resultGetter) +161
Sitecore.Mvc.Presentation.Rendering.GetModel() +281
Sitecore.Mvc.Presentation.Rendering.get_Model() +30
Sitecore.Mvc.Extensions.ObjectExtensions.ValueOrDefault(T source, Func
2 resultGetter) +57
Sitecore.Mvc.Presentation.ViewRenderer.get_Model() +150
Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +255

[InvalidOperationException: Error while rendering view: '/Views/MainLayout.cshtml'. ]
Sitecore.Mvc.Presentation.ViewRenderer.Render(TextWriter writer) +826 Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Render(Renderer renderer, TextWriter writer, RenderRenderingArgs args) +148
Sitecore.Mvc.Pipelines.Response.RenderRendering.ExecuteRenderer.Process(RenderRenderingArgs args) +75 (Object , Object[] ) +74
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +484
Sitecore.Pipelines.DefaultCorePipelineManager.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +22
Sitecore.Mvc.Pipelines.PipelineService.RunPipeline(String pipelineName, TArgs args) +196
Sitecore.Mvc.Presentation.RenderingView.Render(ViewContext viewContext, TextWriter writer) +302
System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +375 System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +90
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList
1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult) +833
System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList
1 filters, ActionResult actionResult) +81
System.Web.Mvc.Async.<>c__DisplayClass21.b__1e(IAsyncResult asyncResult) +37

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.6.1637.0

2
  • This is not a duplicate since I have already update the GlassMapper Commented Jun 14, 2017 at 20:20
  • I have re-opened the question and provided an answer for you
    – Richard Seal
    Commented Jun 14, 2017 at 20:44

1 Answer 1

3

Jim - so, I think the problem is the same - you are running with a Glass binary that has been compiled against a version of Sitecore where IsPageEditor was still available.

When you install the Glass nuget package, it runs a PowerShell script that tries to detect which version of Sitecore you have installed and then references the matching Glass binaries. My guess is that your project may have still referenced the previous version of Sitecore or when you upgraded the Glass nuget package, it didn't re-check your Sitecore.Kernel.dll version.

If you look in your packages folder, you should see all the versions listed like this: Glass Nuget Versions

Check in your project the path to the Glass.Mapper.Sc binary - it should be referencing the one in the 100 folder to match 8.2 update 3, like this: Glass.Mapper.Sc reference

If it is not, just delete the reference and re-add it pointing at the right version, or remove it via NuGet and re-add the NuGet reference, if you do that, make sure that your project is referencing the correct version of Sitecore.Kernel.dll

3
  • Yes, I did try deleting the reference and re-added it so it look like the correct version. However To go a step further I used the object browser to look at the DLL and it does not show IsExperienceEditor instead the 4.3 dll shows IsPageEditor. Commented Jun 14, 2017 at 22:46
  • Did you make sure it was using the dll from the 100 folder? That one will have IsExperienceEditor in it.
    – Richard Seal
    Commented Jun 15, 2017 at 3:39
  • Yes, in fact I uninstalled the nuget packages and reinstalled them. Now my error has changed. I think that I have gotten past this error at this time. Thanks for your help. Commented Jun 15, 2017 at 14:35

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.