What is the bug? (in English)
When a layer group is configured as a single layer (groupAsLayer = true) in the Lizmap QGIS plugin, Lizmap Web Client sends a GetLegendGraphic WMS request for this layer. QGIS Server returns HTTP 400 because it cannot render a legend image for a grouped layer treated as a single layer.
The map renders correctly — only the legend request fails.
Steps to reproduce the issue
- In QGIS Desktop, create a layer group and enable "Group as layer" in the Lizmap plugin layer settings
- Leave legend_image_option unset (default) in the Lizmap plugin
- Publish the project to Lizmap Web Client
- Open the map in the browser and expand the layer legend
Expected behavior:
Lizmap should either skip the GetLegendGraphic request for groupAsLayer layers, or handle the 400 response gracefully without logging errors.
Actual behavior:
Lizmap sends GetLegendGraphic requests for these layers, QGIS Server returns HTTP 400, and errors are logged repeatedly in lizmap-admin.log:
HTTP code 400 on ... "REQUEST" = 'getlegendgraphic' ... "LAYER" = 'Gebaeude'
Workaround:
Set legend_image_option = disabled for all groupAsLayer layers in the Lizmap plugin. This prevents Lizmap from requesting the legend image.
Versions, safeguards, check summary etc
Versions :
- Lizmap Web Client : 3.9.7 - commit 800219e 800219e95
- Lizmap plugin : 5.0.0-beta.1
- QGIS Desktop : 3.44.9
- QGIS Server : 3.44.9
- Py-QGIS-Server : 1.9.6
- QGIS Server plugin atlasprint : 3.4.3
- QGIS Server plugin lizmap_server : 2.14.1
- QGIS Server plugin wfsOutputExtension : 1.8.3
List of Lizmap Web Client modules :
* Version Lizmap Web Client 3.8 needed
List of safeguards :
* Mode : normal
* Allow parent folder : yes
* Number of parent : 4 folder(s)
* Prevent other drive : no
* Prevent PG service : no
* Prevent PG Auth DB : no
* Force PG user&pass : no
* Prevent ECW : yes
Check Lizmap plugin
Operating system
Ubuntu 24.04
Browsers
Chrome
Browsers version
Version 147.0.7727.102
Relevant log output
What is the bug? (in English)
When a layer group is configured as a single layer (groupAsLayer = true) in the Lizmap QGIS plugin, Lizmap Web Client sends a GetLegendGraphic WMS request for this layer. QGIS Server returns HTTP 400 because it cannot render a legend image for a grouped layer treated as a single layer.
The map renders correctly — only the legend request fails.
Steps to reproduce the issue
Expected behavior:
Lizmap should either skip the GetLegendGraphic request for groupAsLayer layers, or handle the 400 response gracefully without logging errors.
Actual behavior:
Lizmap sends GetLegendGraphic requests for these layers, QGIS Server returns HTTP 400, and errors are logged repeatedly in lizmap-admin.log:
HTTP code 400 on ... "REQUEST" = 'getlegendgraphic' ... "LAYER" = 'Gebaeude'
Workaround:
Set legend_image_option = disabled for all groupAsLayer layers in the Lizmap plugin. This prevents Lizmap from requesting the legend image.
Versions, safeguards, check summary etc
Versions :
List of Lizmap Web Client modules :
* Version Lizmap Web Client 3.8 needed
List of safeguards :
* Mode : normal
* Allow parent folder : yes
* Number of parent : 4 folder(s)
* Prevent other drive : no
* Prevent PG service : no
* Prevent PG Auth DB : no
* Force PG user&pass : no
* Prevent ECW : yes
Check Lizmap plugin
Operating system
Ubuntu 24.04
Browsers
Chrome
Browsers version
Version 147.0.7727.102
Relevant log output