The default style of the layergroup is propagated in the layer as default style
Description
Environment
CentOS 7
Attachments
Activity
Has nothing to do with this particular change, it’s another side effect of this other change: https://osgeo-org.atlassian.net/browse/GEOS-9659 . Needs a separate bug ticket, I’ll open it.
I tested this solution on this service:
By loading the layergroup "single mode" : p_bz-TransportNetwork:RoadNetwork-Links-ZLevels with this call:
The serivice replies:
<ServiceException code="StyleNotDefined"> No such style: default-style-p_bz-TransportNetwork:RoadNetwork-Links-ZLevels </ServiceException>
Making the same call, omitting the STYLES parameter, it works:
Why does the default style generate this exception?
Made a pr adding a disable option in WMS service settings. Currently pending on main.
It is available here: https://github.com/geoserver/geoserver/pull/5058
2.19.x backport https://github.com/geoserver/geoserver/pull/5081
2.18.x backport https://github.com/geoserver/geoserver/pull/5082
I have the same issue here. This is also making WMS not INSPIRE compliant.
This conversation could be useful:
From version 2.18, a style called "Layergroup Name Default" is automatically created in getcapabilities for each existing layergroup.
This style is propagated to all Layers. The style is placed in first position, so it's considered the default style.
This creates the following issues:
The default style, defined in the layer, is no more the default style.
The default layergroup style doesn't work for every layer in your layergroup.
I don't understand the meaning of this new feature. I did not find a reference in the documentation.
If this is a bug, please fix it as fast as you can.
If this is a feature, please consider the possibility to disable this with a flag in the layer group configuration.