Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

Get related hits on attached documents for pages in Episerver


I have a page type which is called InfoPage and the code is like this for that

public class InfoPage : StandardPage

        [Display(GroupName = SystemTabNames.Content, Order = 300)]
        public virtual ContentArea RightSideArea { get; set; }

        [Display(GroupName = SystemTabNames.Content, Order = 350)]
        public virtual string RightSideBoxHeader { get; set; }

Now in the rightSideArea users can add blocks and one of the block type is this

    public class DocumentListBlock : SiteBlockData
        [Display(GroupName = SystemTabNames.Content, Order = 100)]
        [AllowedTypes(new[] { typeof(GenericMedia) })]
        public virtual ContentArea Files { get; set; }

Now what I am trying to do is when I doing search (unified search) I want to check if the page has any documents in that rightSideArea whose name contains "X". 

I started following this article to add a SearchAttachmentText but it doesn't seem to work.

I have installled this package


Then I added this in dependencyRessolver


Then in my FindInitialization I did this

            var searchConventions = SearchClient.Instance.Conventions;

                .IncludeField(x => x.SearchAttachmentText());

And then I created an extension function like this

public static string SearchAttachmentText(this InfoPage page)

   // here I want to find the documents from the content area but for now I am returing a dummy text to see if it indexes

return "test";


But it doesn't help. When I create a new InfoPage it doesn't add this in index.

Nov 02, 2022 12:26
* 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.