Layer groups and/or their component layers appear multiple times in capabilities document

Description

Behaviour of layer groups seems inconsistent in the capabilities document. Single layer groups will sometimes have their individual layers exposed as well as the group. When added to another group, single groups will sometimes be exposed multiple times, under the correct group and in the root.

Steps to replicate with Geoserver demo data:

  • View the getcapabilities document without making any changes to demo data.

  • tasmania only appears as a group in the capabilities document. tiger-ny and spearfish both show as groups as well as exposing their individual layers.

  • Create a container group and add the Tasmania group to it. tasmania group appears under the container group and also under the root.

  • Create a second container group and add the tiger-ny group to it. tiger-ny group appears only under the container group and not in the root, correct behaviour. However all of the components of tiger-ny still show up as individual layers under the root.

Go into one of the tiger-ny layers and uncheck the Advertised box so the layer doesn’t show up on it’s own, the tiger-ny group then appears under the root as well as under the container group.

Environment

None

Activity

Show:

Andrea Aime February 15, 2017 at 11:51 AM

Mass closing all resolved issues not modified in the last 4 weeks

Andrea Aime October 28, 2016 at 8:50 AM
Edited

Got a way to reproduce it:

Here is the example with Geoserver Demo-data

  1. Add all demo layer groups in a root "test" group

  2. When all LayerGroups are in Container-tree mode and all Layers are Advertised the Layer list is looking good

  3. Now LayerGroup tiger-ny is set to the Single-mode, its sub layers giant_polygon, poi, tiger_roads etc. can be seen in the layer list.

  4. When in example giant_polygon layer is set to a not-Advertised tiger-ny LayerGroup can be seen twice in the Layer list.

Andrea Aime July 2, 2016 at 3:50 PM

The layer group "mode" is configured by the administrator, if the current behaviors are not enough, we can add more. Exposing the individual layers of a group in simple mode is by design and required by backwards compatibility, so no way we can change it, but we could create a new variant of the simple mode that hides the layer fully.
Anyways, this report should probably be closed or split into subtickets where a single bug or feature request is reported. E.g., the only bug I really see above is the tasmania group showing up both in its container and the root, but following the instructions, I cannot reproduce it.
I'd close this one and wait for a bug report that provides clear instructions to reproduce.

Jody Garnett June 30, 2016 at 6:26 PM

Not sure what to do about this, the choice of layergroup mode should be up to the administrator (rather than enforced by the application).

I would like an easier way to configure where layer's appear in the WMS capabilities document.

Fixed

Details

Assignee

Reporter

Fix versions

Affects versions

Priority

Created November 15, 2013 at 8:03 AM
Updated February 15, 2017 at 11:51 AM
Resolved October 28, 2016 at 12:58 PM