Explicitly Hide a Mount in the Experience Manager
Info: This feature is available starting from Hippo CMS 12.0.0.
When the Experience Manager opens an unexpected channel—such as a REST API mount instead of the intended website—this typically indicates an HST host configuration issue. In these cases, you will usually find WARN messages in the site logs similar to the following:
WARN http-nio-8080-exec-3 [VirtualHostsService.warnDuplicateChannel:450] Skip channel with id '${project-channel}' because already present for host group '${project-specific-hostgroup}'. Most likely there is a parent channel that already is a channel mngr channel. Set 'hst:nochannelinfo = true' on mount 'MountService [jcrPath=${project-specific-path}, hostName=${project-specific-host}]' to avoid this problem.
The placeholders ${...} are specific to your project and environment.
Problem Overview
This issue often occurs when you define a REST mount that:
- Uses the same content as the main website
- Uses the same sitemap as the main website
In this scenario, the REST mount does not have the following property set:
hst:ismapped: false
For example, the configuration below can trigger the described warning when the HST model loads:
/hst:hst: /hst:configurations: /myproject: /hst:sitemap: /...: /hst:channel : /hst:channelinfo: /hst:hosts: /dev-localhost: /localhost: /hst:root: jcr:primaryType: hst:mount hst:mountpoint: /hst:hst/hst:sites/myproject /rest: jcr:primaryType: hst:mount hst:namedpipeline: JaxrsRestContentPipeline hst:types: [rest] /hst:sites: /myproject:
Explanation
In this configuration, the rest mount inherits the hst:mountpoint value from its parent. This is required because the rest mount uses the JaxrsRestContentPipeline, which depends on the hst:sitemap for content mapping. Since CMS 12.0.0, the hst:channel node is located under /hst:hst/hst:configurations/myproject, so the rest mount also references an hst:channel node.
However, an hst:channel node can only be associated with a single mount. The intended behavior is for the hst:root mount to be visible in the Experience Manager, while the rest mount should remain hidden.
Solution: Hide the Mount
To hide the rest mount in the Experience Manager, set the following property:
hst:nochannelinfo: true
Update the rest mount configuration as follows:
/rest: jcr:primaryType: hst:mount hst:namedpipeline: JaxrsRestContentPipeline hst:types: [rest] hst:nochannelinfo: true
Setting hst:nochannelinfo = true ensures that the mount does not appear in the channels overview, even if it references an hst:configuration node with an hst:channel node.
Info: If the
restmount is unmapped, thehst:nochannelinfoproperty is not required. Unmapped mounts do not use anhst:configuration.
Info: The
hst:nochannelinfoproperty is not inherited by child mounts. If you need this behavior on a child mount, you must set the property explicitly.
Additional Notes
Mounts that use the JaxrsRestPlainPipeline pipeline are typically unmapped and do not require the hst:nochannelinfo property. For example, the following configuration does not need hst:nochannelinfo:
/rest: jcr:primaryType: hst:mount hst:namedpipeline: JaxrsRestPlainPipeline hst:types: [rest] hst:nochannelinfo: false