Is it possible to perform a patch that has to match on more than on attribute?
My issue is that I'd like to patch after:
<sitecore>
<processors>
<uiDeleteItems>
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="Execute"/>
</uiDeleteItems>
</processors>
</sitecore>
Typically, I'd patch with something like:
<sitecore>
<processors>
<uiDeleteItems>
<processor mode="on" type="Custom.DeleteItems, Custom" method="RemoteDelete" patch:after="*[@type='Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel']"/>
</uiDeleteItems>
</processors>
</sitecore>
or...
<sitecore>
<processors>
<uiDeleteItems>
<processor mode="on" type="Custom.DeleteItems, Custom" method="RemoteDelete" patch:after="*[@method='Execute']"/>
</uiDeleteItems>
</processors>
</sitecore>
The problem is that there are previous processors that match on these descriptors prior to the one I'm targeting:
Method:
<processor type="Sitecore.Buckets.Pipelines.UI.ItemDeleted, Sitecore.Buckets" method="Execute" mode="on" patch:source="Sitecore.Buckets.config"/>
Type (in order they appear):
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="Confirm"/>
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="CheckTemplateLinks"/>
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="CheckCloneLinks"/>
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="CheckLinks"/>
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="CheckLanguage"/>
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="UncloneItems"/>
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="Execute"/>
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="PostAction"/>
(and many more for type)
So what I really need to do is patch:after
when the type and method equal my values. Is this possible out-of-the-box?
-- Edit after side-barring with Hishaam --
Full Showconfig output of elements in question:
<uiDeleteItems>
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="CheckPermissions"/>
<processor type="Sitecore.Buckets.Pipelines.UI.ItemDeleted, Sitecore.Buckets" method="Execute" mode="on" patch:source="Sitecore.Buckets.config"/>
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="Confirm"/>
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="CheckTemplateLinks"/>
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="CheckCloneLinks"/>
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="CheckLinks"/>
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="CheckLanguage"/>
<processor type="Sitecore.PathAnalyzer.Client.Pipelines.DeleteItems.DeletePathAnalyzerItems,Sitecore.PathAnalyzer.Client" method="CheckDefaultSiteMapGroup" mode="on" patch:source="Sitecore.PathAnalyzer.Client.config"/>
<processor type="Sitecore.PathAnalyzer.Client.Pipelines.DeleteItems.DeletePathAnalyzerItems,Sitecore.PathAnalyzer.Client" method="CheckMapItems" mode="on" patch:source="Sitecore.PathAnalyzer.Client.config"/>
<processor type="Sitecore.ContentTesting.Pipelines.DeleteItems.DeleteTestDefinitionItems,Sitecore.ContentTesting" method="CheckActiveTests" mode="on" patch:source="Sitecore.ContentTesting.config"/>
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="UncloneItems"/>
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="Execute"/>
<processor mode="on" type="Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel" method="PostAction"/>
</uiDeleteItems>
In my case, I can certainly target method="PostAction"
and patch:before
. I typically like to insert my patches logically, in the event an additional patch is implemented.
Logically, I would say
"My processor should execute after the
type='Sitecore.Shell.Framework.Pipelines.DeleteItems,Sitecore.Kernel' method='Execute'
processor"
Not necessarily "Before the PostAction processor".
I will leave the question open as I'm curious if what I originally asked is possible OOTB.
Also- the new load order technique in Sitecore 9 would provide a mechanism to accomplish what I'm after, but this is on 8.2u4.