Yuri Dorokhov
Yuri Dorokhov

Reputation: 726

Sitecore. Disable a pipeline's processor

I need to patch Sitecore's pipeline to disable one of the processors. Can I do that, or should I remove and implement whole pipeline?

Upvotes: 1

Views: 1398

Answers (1)

Marek Musielak
Marek Musielak

Reputation: 27142

There is nothing like disabling processor in Sitecore out of the box.

What you can do, you can create a patch config which will remove that processor. But you need to be aware that this processor will never be executed unless you change the configuration again and application is restarted.

Below is example how to remove RunQueries processor from the contentSearch.queryWarmup pipeline:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
  <pipelines>
    <contentSearch.queryWarmup>
        <processor type="Sitecore.ContentSearch.Pipelines.QueryWarmups.RunQueries, Sitecore.ContentSearch">
            <patch:delete />
        </processor>
    </contentSearch.queryWarmup>
  </pipelines>
</sitecore>

IMPORTANT:

Remember that Sitecore parses all the config files alphabetically, and then subfolders (alphabetically again). So your patch file must be added "after" the original config which adds the processor. You may want to put all your patches e.g. in App_Config/ZZ.Custom/my.patch.config.

Upvotes: 5

Related Questions