Enable Administrators to Delete a Channel
Introduction
Goal
Configure a publication channel as deletable so that users with administrator privileges candelete it in the Experience manager.
Background
The Experience manager supports the deletion of channels.
Deleting a channel is irreversible, meaning that once the deletion of a channel has been confirmed, there is no other way of bringing that channel back then to restore a back-up. Because deleting a channel is irreversible, the following safeguards have been implemented:
- only users with administrator privileges are allowed to delete a channel
- only channels marked deletable (see below) can be deleted
- a project can subscribe to the BeforeChannelDeleteEvent (seeRespond to a Before Delete Channel Event) and provide additional safeguards
What is Deleted?
When achannel is deleted, the Experience manager only deletes pieces of the HST configuration related to that channel. No content is deleted. If content related to the deleted channel should be deleted after the deletion of that channel, that content needs to be deleted manually or by subscribing to the BeforeChannelDeleteEvent.
The following pieces of HST configuration are deleted:
- Thehst:site node
Allhst:mount nodes referring to the deleted channel, in all virtual host groups*
Thehst:configuration node referred to by thehst:site node, along with its preview copy. If thehst:configuration node is inherited by another HST configuration node, only the preview copy is deleted.
In case of using theRelevance feature of Hippo's enterprise edition: All goals bound to a URL of the deleted channel are deleted as well. Consequently, all experiments bound to a deleted goal are deleted as well.
In case of using theProjects feature, all created branches for the channel will also be deleted. Also note that in case of , you can only delete a channel if and only if the core is selected. If you have selected a certain branch, you cannot delete the channel.
*If any of thesehst:mount nodes contain child mount nodes, deletion of the channel will fail before the BeforeChannelDeleteEvent is published.
Mark a Channel as Deletable
By default, channels cannot be deleted. In order to be able to delete a channel, it must be marked as deletable. This mark is represented by thehst:deletable flag (Boolean property) on thehst:channel node:
/hst:hst: /hst:configurations: /mychannel-preview: /hst:workspace: /hst:channel: hst:deletable: true
The deletable mark can be bootstrapped, part of ablueprint (such that all channels created from that blueprint are deletable), or set using theHippo Console or a customUpdater script. If the deletable mark is added to existing channels which have a preview copy, the mark should be set on both nodes.