Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

Self referencing loop detected for property 'ManifestModule'



We are getting the same error stacktrace described in this post:

But we're getting it when attempting to do a nested search in Find. We have a nested convention applied:

SearchClient.Instance.Conventions.NestedConventions.ForType().Add(v => v.ListingDates);

Where listing dates is a collection of a custom object type.

And in the search query:

            DateTime now = DateTime.Now;

            var exp = new NestedFilterExpression(
                item => item.ListingDates, 
                item => item.ListedFrom.Exists() & item.ListedFrom.LessThan(now) & item.ListedTo.Exists() & item.ListedTo.LessThan(now), 

            return new FilterExpression(x =>
                x.MatchType(typeof(Variant.Models.Variant)) &
                ((Variant.Models.Variant)x).ListingDates.MatchItem(item => exp));

It blows up with the error text 'Self referencing loop detected for property 'ManifestModule' - the JSON.NET serializer seems to be choking on a recursive reference within the Assembly, though why it's trying to serialize the assembly I have no idea!

Any pointers appreciated as to whether this is a bug or a problem with the way we're using Find.

Aug 26, 2016 12:22

Can you add code for the classes Variant and ListingDates. Do they have navigation properties going both ways?

Aug 26, 2016 12:36

Hi Daniel,

No, they don't - the ProductListingDateRange class has just 3 properties:

    public class ProductListingDateRange

        public virtual string MarketId { get; set; }

        public virtual DateTime? ListedFrom { get; set; }

        public virtual DateTime? ListedTo { get; set; }


And the variant class exposes a collection of these as an IEnumerable.


Edited, Aug 26, 2016 12:44

I had a similar issue and I solved it by using the NestedFilter property on my NestedFilterExpression

So try changing your return statement to this.

return new FilterExpression<IContent>(x =>
    x.MatchType(typeof(Variant.Models.Variant)) &
    ((Variant.Models.Variant)x).ListingDates.MatchItem(item => exp.NestedFilter));
Sep 02, 2016 20:55
* 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.