Manage Publication of Deletions with the Sitecore ASP.NET CMS

This blog post describes how the Sitecore ASP.NET CMS publishes items that you delete from the Master database used for content management to the publishing target database(s) supporting content delivery. The Publish deleted items thread and many other threads on the Sitecore Developer Network (SDNforums prompted me to write this blog post. For more information about publishing and publishing targets, see my blog post All About Publishing Targets in the Sitecore ASP.NET CMS.

By default, Sitecore has no workflow for deleted items. Some publishing operations, such as incremental, smart of republishing of the entire site, publish all deleted items to the publishing target databases. Other publishing operations, such as the commands on the ribbon in the Content Editor to publish individual items and branches, do not always publish all deletions, but only deleted items that were children or otherwise descendants of the published item. Publishing a deleted item publishes the deletion of its descendants in the same way that deleting an item deletes its descendants. For more information about workflow with Sitecore, see the Workflow Reference and the Workflow Cookbook on SDN.

I can imagine several potential alternative strategies for managing deletion, but I'm not sure which would be most desirable. For example, you could:

  1. Override deletion commands in the user interface to not delete the item, but place it in a workflow containing a workflow action for the final state that deletes the item and publishes that deletion. In fact, SDN contains a Delete Item Workflow Action for Sitecore 5.3 that might be useful for this task, but may require some updates to work with current versions.
  2. Override deletion commands (at least, for most users and items), and add a Delete command to one or more workflows to trigger a deletion action as described above. Remember to set access rights on the workflow command that triggers deletion.
  3. Override the workbox to list items in the recycle bin, and the publishItem processor to respect the workflow state of deleted items. This would probably be a considerable effort. For an example publishItem processor, see my blog post Intercept Item Publishing with the Sitecore ASP.NET CMS.
  4. Add publishing commands to the recycle bin.


There are probably numerous other approaches depending on varying requirements. You may not have noticed the post number in the last post linked in the introduction to this blog post. This issue goes back to at least 2006. Sitecore Customer Service almost certainly has one or more solutions available.

Please comment on this forum thread if you have any experience with or ideas about managing publication of deleted items with the Sitecore ASP.NET CMS, or to indicate the strategy you favor for managing deletion.

  • Hi John,  I'm new to Sitecore. I was just wondering if you can point me in the right direction for Sitecore DMS 2.0 tutorial.  Much appreciated, Dyni

  • @Dyni: Start with the "Engagement" titles under 6.aspx and post again if those don't seem to be what you need or if you still have questions.

  • You made some good points there. I did a search on the topic and found most people will agree with your blog. Thanks

  • Hi John, I just run into this post because some contentmanagers of our customer keep forgetting to publish the parentitem after deleting an item. Instead of adding workflow, is it also possible to change the concept of deleting an item from what is is now (delete, and manually publish the parent) to "delete and publish the deleted item"?  Would that work? I mean.. is it possible to intercept the delete event and publish the deleted item immediately?  I am sure that most contentmanagers do not have any problem when they know that a delete command will perform a delete-and-publish.  

  • @Nico: I don't know if you can explicitly publish the deletion of a single item. I don't know what would happen if you passed the ID or some other format of a deleted item through the relevant APIs; I would expect an exception. Maybe you could publish the parent (and descendants?) of the deleted item, assuming any updates to those items are in workflow or have other publishing restrictions as appropriate. Or publish something irrelevant (the /sitecore item without descendants?). Another option would be to trap deletion or override deletion commands to remove the item from all publishing target databases, but that would not trigger output cache clearing by default.