lizmap-web-client
lizmap-web-client copied to clipboard
Wrong behaviour of selection tools with layer with primary key column of type int8
What is the bug?
I have a project with two identical PostgreSQL/PostGIS layers (geometry PointZ and CRS 7791). The former, which is a copy of the second one, has a primary key column (named id_punti) of type int4 and the later has the same primary key column (named id_punti) but of type int8. The selection tool works correctly with the first layer (primary key int4) but has a wrong behaviour with the second layer (primary key int8). When I try to select some point, the tool highlights random points and not those specified with the selection instrument (I tried all tools circle, rectangle, etc. ). The highlighted rows in the attribute table are correct and also the filter works fine but the geometries in the map are not correctly highlighted.
Screenshots and logs
Environment
- Lizmap version: 3.3.8
- QGIS Server FULL version: 3.10.8
- QGIS Desktop FULL version: 3.10.8
- OS (Windows, Linux, MacOS, Android…): Windows 10
- Browser (Firefox, Chrome…): Chrome and Firefox
This is a known problem. But AFAIK, this bug is upstream to QGIS Server and not related to Lizmap. I wanted to have a check in Lizmap-Plugin.
I think I heard some news about this from @rldhont, maybe I'm wrong.
This issue is missing some feedbacks. 👻 Please have a look to the discussion, thanks. 🦎
This issue is missing some feedbacks. 👻 Please have a look to the discussion, thanks. 🦎
It seems still valid, unless it has been resolved upstream. Please add here the reference to the ticket upstream for reference. After that I balieve this one can be closed.
It's a QGIS Server issue. The FeatureID has to be an int4, if the primary key is not an int4, QGIS creates a join table between the FeatureID as an int4 and the primary key, but each QGIS Server creates its own join table and adds primary key values in the order they are facing it.
We try to fix it by providing in WFS and WMS FEATRUEID as the primary key.
So to avoid this issue in the mean time (before a fix in QGIS Server upstream)
- PostgreSQL layer : Int4 or serial only, no Int8
- Any other provider are fines with Int8
- Add a check in Lizmap plugin to warn this
@Gustry I just found a client getting this issue. We could take some paid support time to Add a check in Lizmap plugin to warn this
?
Ref: support 1963
The plugin is already warning about int8 fields, from https://github.com/3liz/lizmap-plugin/issues/389 It's not a issue in Lizmap Web Client, but in QGIS server.