I am on Sitecore.NET 8.2 (rev. 170614) for one of the project. The documents are organised in buckets and there is a publish pipeline processor written to publish the parent item if not published before when documents are published. I am planing to remove the custom processor as I believe this must be OOTB functionality in the Sitecore to publish the bucket when item child item is published. Is my understanding correct? Is there anyway I can remove the custom processor?
2 Answers
No, you're wrong.
Sitecore does not publish any parent item if you publish a single item only.
It doesn't matter if it's item in a bucket or item which is not inside a bucket - you need to make sure that all the ancestors are published.
That would be a dangerous precedence if Sitecore was publishing items "up the tree" on its own.
In Sitecore Publishing Service from version 2.2.1 there is a "sc.publishing.relateditems.xml" available which will publish all Item parents. I guess that's the behavior you expect.
<Settings>
<Sitecore>
<Publishing>
<Services>
<TreePublishHandler>
<Options>
<!-- Publishes all ancesters of a related item if they do not exist in the target. Ancesters that have changed, but already exist in the target will not be published using this option.-->
<PublishRelatedItemParents>True</PublishRelatedItemParents>
</Options>
</TreePublishHandler>
</Services>
</Publishing>
</Sitecore>
</Settings>
So maybe you want to consider to use the publishing service?