Diagnosing Glass Mapper issues in Sitecore

  • Introduction

    Glass Mapper is a third-party module that is widely used by Sitecore partners in their solutions. Sitecore and Glass Mapper have not been tested together, so we cannot guarantee the stability of such a configuration.

    This article provides some examples of issues which might occur during such integration, and some diagnostics steps you can take in order to clarify if an issue is related to Glass Mapper.

  • Potential issues and diagnostics

    High memory utilization

    Diagnostics: Comment out the usage of the Glass.Mapper.Pipelines.ObjectConstruction.Tasks.CreateInterface.InterfacePropertyInterceptor.LoadAllValues() method in custom code or Glass Mapper sources used in a Sitecore-based project. Observe the memory usage levels and see if the issue persists.

    Note: Removing the LoadAllValues method may cause problems when models are cached or lazy loading is disabled.

    Solution: Contact Glass Mapper support in case of memory issues that may be caused by this module.

    Text or links are wrongly encoded on your page

    Diagnostics: Replace Glass Mapper helpers with default Sitecore ones (for example, @Html().Sitecore().Field(…)), and see if the issue persists.

    Solution: Ensure that you use the latest Glass Mapper version, use the default helpers, or contact Glass Mapper support.

    Rendering problems in Experience Editor or front-end site on pages with Glass Mapper helpers

    Diagnostics: Replace Glass Mapper helpers with default Sitecore ones (for example, @Html().Sitecore().Field(…)), and see if the issue persists.

    Solution: Ensure that you use the latest Glass Mapper version, use the default helpers, or contact Glass Mapper support.

  • General Recommendations and useful links

Applies to:

CMS 6+

September 21, 2017
February 15, 2019

Keywords: 

  • MVC