Vulnerability in EPiServer.Forms
I have excluded items from being indexed by Search & Navigation, but they are still indexed. I have this initialization module:
public class FindInitialization : IInitializableModule
public void Initialize(InitializationEngine context)
ContentIndexer.Instance.Conventions.ForInstancesOf<MyPageType>().ShouldIndex(x => false);
ContentIndexer.Instance.Conventions.ForInstancesOf<BlockData>().ShouldIndex(x => false);
But the blocks and MyPageType are still being indexed.
Any tips on what I am doing wrong?
Two things off the top of my head
I figured out why this is happening. There are block types from an earlier version of the solution - epi 6, that are generated in admin, and not in code.They reside as nodes in the page tree.
Is it possible to exclude specific nodes from the indexing, or do I need to tell them to replace all the blocks with newer versions?
You can probably use Ancestors to filter out the pages belong to specific nodes, given that you know their content references
ContentIndexer.Instance.Conventions.ForInstancesOf<T>().ShouldIndex(x=>!x.Ancestors().Contains("the node content link"))
Yes, but since they are created in admin, I don't have a type to put in for 'T'. I will try with PageData.
Yes go with PageData or even IContent.