3

I updated the Glass Mapper version for our Sitecore 8.2 project from version 4.0.1.8 to version 4.3.4.196.

After upgrading Sitecore is still running, but our websites are throwing exceptions:

Model too deep. Potential lazy loading loop

I added the Cacheable property to the Models and I also had the Setting = SitecoreFieldSettings.DontLoadLazily on the Fields from before the upgrade. But no result, it keeps throwing this error.

My model structure has not changed, anyone any idea what is going on? Or maybe that ModelDepthCheck can be disabled?

1 Answer 1

7

Please see the release notes for 4.3 which explain how to remove the depth check: http://www.glass.lu/Blog/Release4-3

The depth check is designed to capture models where lazy loading is disabled but a loop might have been caused which would result in a stack overflow. However some models maybe deep enough anyway to cause the depth check to fire. Currently it is set to a depth of 8.

1
  • Ah yes, now I see it. I overlooked the factory.Remove<ModelDepthCheck> yesterday in the release notes. :( Thanks Jan 17, 2017 at 9:32

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.