Try our conversational search powered by Generative AI!

Exception in IContentLoader.GetChildren

Vote:
 

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
Vote:
 

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
Vote:
 

Ć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
Vote:
 

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
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.