We have upgraded our sitecore website to Sitecore 9.2 and also updated our Glass Mapper to version 5.5.28.

Currently, we noticed that we can't get the children on our iteration when we specify the type on the BaseChildren. We are also using the base class that was generated from the Item templates.

Below is the sample code

@foreach (INavigation level2 in level1.BaseChildren.OfType<INavigation>())

any ideas why we encounter this issue and suggestions how we can fix this? Thanks in advance.

  • Did you ever figure out what was causing this? I'm facing the exact same issue in 5.5.28, as well. Commented May 18, 2020 at 19:44

1 Answer 1


I had this issue and realized I had forgotten to set my model to IEnumerable after upgrading my project to GlassMapper 5+ with Sitecore 10.1

@model IEnumerable

Edit attempt 3: @model IEnumerable<GlassBase>

  • My first time answering and I missed the code '@model IEnumerable<GlassBase>'
    – KrisB
    Commented Sep 14, 2021 at 15:24

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.