3liz / lizmap-web-client

Transfer a QGIS project on a server, Lizmap is providing the web interface to browse it
https://www.lizmap.com
Mozilla Public License 2.0
257 stars 143 forks source link

[Bug]: Expand button for legend from layers grouped as a layer doesn't work #4842

Open ClemDut opened 1 week ago

ClemDut commented 1 week ago

What is the bug? (in English)

Legend from layers "grouped as a layer" in lizmap plugin can't be expand by clicking on the appropriate button. However, legend expands when click on the sup group checkbox, but you can't unexpand it after that.

The layer's symbology is based on rules.

image

Steps to reproduce the issue

You can see our project adzi_2021.qgs of our main instance to reproduce this bugg (SMAVD).

1- Group many layers, at least one must have a symbology based on rules (probably same with categorised or other symbology) 2- Check "Group as layer " in lizmap plugin 3- try to expand legend on lizmap web 4- after clicking on the expand button, check the group checkbox to expand the legend 5 - try to unexpand the legend

Versions, safeguards, check summary etc

Lizmap Web Client : 3.7.11
Lizmap plugin : 4.4.1
QGIS Desktop : 3.34
QGIS Server : 3.34.11
Py-QGIS-Server : 1.9.1
QGIS Server plugin atlasprint : 3.4.1
QGIS Server plugin lizmap_server : 2.11
QGIS Server plugin wfsOutputExtension : 1.8.2

Check Lizmap plugin

Operating system

windows 11 Pro v 10.0.22621

Browsers

Firefox

Browsers version

Firefox 131.0

Relevant log output

No response

Antoviscomi commented 5 days ago

@ClemDut even in mine, it seems the expansion of layer (Grouped as layer), It's managed by the father group as you can see in screencast below, it seems an anomalous behaviuor because of there isn't a logic flow in response of click @Gustry @nboisteault , It seems to me that disabling the father group It shouldn't be the child group automatically collapsed, however the re-expansion doesn't seems to follow the child group reactivation, but only the father group deactivation/reactivation it seems able to do it, but only after subsequent further deactivation/reactivation of child group. Am I wrong?

Video del 07-10-2024 11:17:42.webm

nboisteault commented 4 days ago

@rldhont

{
    "0": {
        "nodes": [
            {
                "icon": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAAH0lEQVQ4jWNUVlb+xUAJoNQAJopsHzVg1IBRA6hnAAAe4ALkYETtuQAAAABJRU5ErkJggg==",
                "title": "sousquartiers",
                "type": "layer"
            },
            {
                "symbols": [
                    {
                        "icon": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAAJ0lEQVQ4jWNUUlP5z0ABYGFgYGD4vM6WbAOYKLF91IBRA0YNoKIBAB1PA2vFB/uGAAAAAElFTkSuQmCC",
                        "title": "CROIX D'ARGENT"
                    },
                    {
                        "icon": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAAJ0lEQVQ4jWNUV1X7z0ABYGFgYGA4mTCfbAOYKLF91IBRA0YNoKIBAOHFA1sV3nu5AAAAAElFTkSuQmCC",
                        "title": "HOPITAUX-FACULTES"
                    },
                    {
                        "icon": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAAJ0lEQVQ4jWNUU1P+z0ABYGFgYGBYNZOFbAOYKLF91IBRA0YNoKIBAO2yAtfoSp6eAAAAAElFTkSuQmCC",
                        "title": "LES CEVENNES"
                    },
                    {
                        "icon": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAAJ0lEQVQ4jWNUVVf9z0ABYGFgYGBoPZRMtgFMlNg+asCoAaMGUNEAAGwgAzwQHj0OAAAAAElFTkSuQmCC",
                        "title": "MONTPELLIER CENTRE"
                    },
                    {
                        "icon": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAAJ0lEQVQ4jWNUVVb7z0ABYGFgYGCoZtxLtgFMlNg+asCoAaMGUNEAALO6AsisoPSYAAAAAElFTkSuQmCC",
                        "title": "MOSSON"
                    },
                    {
                        "icon": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAAJ0lEQVQ4jWNUV1b+z0ABYGFgYGA4oMpJtgFMlNg+asCoAaMGUNEAAJS4AnwZPPjLAAAAAElFTkSuQmCC",
                        "title": "PORT MARIANNE"
                    },
                    {
                        "icon": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAAJ0lEQVQ4jWNUVlP7z0ABYGFgYGBgm7yGbAOYKLF91IBRA0YNoKIBAOTOAtUUMgxkAAAAAElFTkSuQmCC",
                        "title": "PRES D'ARENE"
                    },
                    {
                        "icon": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAAJ0lEQVQ4jWNUUVH7z0ABYGFgYGAwddhCtgFMlNg+asCoAaMGUNEAAHbsArjT0z3CAAAAAElFTkSuQmCC",
                        "title": ""
                    }
                ],
                "title": "quartiers_categorized",
                "type": "layer"
            }
        ],
        "type": "group",
        "name": "mutually_exclusive_group_with_one_categorized_layer",
        "title": "mutually exclusive group with one categorized layer",
        "layerName": "mutually exclusive group with one categorized layer"
    }
}