Exception in IContentLoader.GetChildren

Member since: 2010
 

We're using Episerver 11.4.
When calling contentLoader.GetChildren(someContentRefernce).ToList() we were getting the following error message: "Lazy loaded property value is not supported by the current property instance".

The stack trace didn't give us more info, like which page is throwing the exception, so we assumed it's one of the pages we recently created that is using PropertyList property.

Anyway... The page tree in episerver is using the same api (content loader, something something), and if one of the child pages throws an exception, it is not possible to expend the parent page in order to delete corrupted pages from edit mode or continue working with non-corrupted pages.

Feature request: Would be nice to have some try/catch logic in the GetChildren implementation so that corrupted pages don't prevent editors from accessing non-corrupted pages.

#194706 Edited, Jun 28, 2018 15:30
  • Member since: 2010
     

    Hey Dejan,

    How did you solve this problem? I was experiencing the same on localhost, also when using PropertyList. How did you figure out which page was causing the problem? Then I guess you deleted it from code.

    BR,
    Marija

    #194919 Jul 08, 2018 17:26
  • Member since: 2010
     

    Ćao Maraja,

    We didn’t know which page was causing the problem, so we tried to delete the page type from admin mode.

    In admin mode, we’ve got a warning/pop up saying that page type cannot be deleted because we had X instances of that page type. The popup contains links to pages in edit mode, which allowed us to open and delete a problematic page from edit mode. 

    #194920 Jul 08, 2018 19:28
  • Member since: 2012
     

    If you get the problem in development you can create a decorator for IContentLoader and register it.

    In the decorator you can add try/catch and break/log to see which content it is that causes the exception.

    Kind regards

    EN

    #194987 Jul 10, 2018 16:37