Explicitly hide a Mount in the Experience Manager

This feature is available since Hippo CMS 12.0.0

If a wrong channel gets opened by the Experience manager (for example a REST API mount) instead of the website you expected, you most likely have an hst  host configuration issue described on this page. In the (site) logs you can most likely find back WARN messages similar to the one below:

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.

where the values ${...} are domain specific depending on the end project.

In general, the problem is seen when, for example, you have a REST mount defined that uses the same content as the normal website and that uses the same sitemap as the normal website. It thus means you have a REST mount that does not have

  hst:ismapped: false

For example, the host / mount configuration below results possibly in the problem described and certainly does log the WARN message above when the HST model is loaded:

/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:

The above configuration results in the WARN above. Why? This is because the mount rest inherits the hst:mountpoint value from the parent mount (it needs that mountpoint because the rest mount uses the JaxrsRestContentPipeline which requires the hst:sitemap for the content mapping) and thus refers to the /hst:hst/hst:configurations/myproject configuration. However, since CMS 12.0.0, the hst:channel node has moved from /hst:hst/hst:channels to the /hst:hst/hst:configurations/myproject meaning that the mount rest also has an hst:channel node. But, an hst:channel node is allowed to be used only by one single mount. The intented behavior is that the hst:root mount is visible in the Experience manager, and the rest mount isn't. This can be achieve by setting the property:

  hst:nochannelinfo: true

Thus to fix the above configuration, change the rest mount to become

/rest:
  jcr:primaryType: hst:mount
  hst:namedpipeline: JaxrsRestContentPipeline 
  hst:types: [rest]
  hst:nochannelinfo: true

The hst:nochannelinfo = true indicates that the mount should not be presented in the channels overview, even not if it points to a hst:configuration node that has an hst:channel node. 

If the rest mount wasn't mapped, the hst:nochannelinfo property is not needed because unmapped mounts do not use an hst:configuration.
The hst:nochannelinfo property is not inherited by child mounts and if needed on a child mount, thus needs to be redefined.

Typically, mounts that use the JaxrsRestPlainPipeline pipeline are not mapped and thus don't need the hst:nochannelinfo to be set. For example, the config below does not need the hst:nochannelinfo.

/rest:
  jcr:primaryType: hst:mount
  hst:namedpipeline: JaxrsRestPlainPipeline 
  hst:types: [rest]
  hst:nochannelinfo: false
Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?