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]: Filtering form does not work because of spatial filter #4071

Open lbtrd83 opened 9 months ago

lbtrd83 commented 9 months ago

What is the bug?

Hello everyone,

I am using the version of Lizmap Web Client 3.6.8. On one of my layers I initialized a filter per user via an attribute field: in the extension lizmap>filter by user>attribute filter and on this page I filled in the layer to filter with the attribute table field that corresponds to the user login (city_edition).

Therefore, when the municipality of Montauban connects it sees only the dwellings of its municipality. I wanted on the same layer, to set up a filtering form so that users can filter by type of housing : in the extension of lizmap>filtering forms.

When I do not put a filter per user my filter form appears complete (1) and works (I have 20.553 objects on my layer that I can filter). But as soon as I put back the filtering by user it no longer appears. On the website, in the filter tab of my project (the magnifying glass) I have the layer that is visible to be filtered but below appears 0 objects (2).

If you have the solution to bypass the space filters, I will be thankful.

Steps to reproduce the issue

Layer called : "inhabitants.shp" Attribute table (1st row):
id | location| number_inhabitants | type_of_accomodation | city_edition 1 | Montau| 96 | 3 | MAU.EDIT

(1) Filter form WITHOUT the spatial filter Capture d’écran 2024-01-17 123050

(2) Filter form AND the spatial filter Capture d’écran 2024-01-17 115756

Versions

Versions :

List of safeguards :
* Mode : safe * Allow parent folder : no * Prevent other drive : yes * Prevent PG service : yes * Prevent PG Auth DB : yes * Force PG user&pass : yes * Prevent ECW : yes

Check Lizmap plugin

Operating system

Windows 10

Browsers

Chrome

Browsers version

Chrome 106

Relevant log output

No response

arno974 commented 8 months ago

I have almost the same problem. But in my case, even though I haven't set up a spatial filter, the form filter fields are still not displayed. And, it works on other projects on the same Lizmap Web Server :

image

arno974 commented 8 months ago

Quick edit, in fact in my case the form fields didn't appear because I haven't specify a title in the QGIS Lizmap Extension.

thoomasbro commented 2 days ago

I have the same issue. In this project I set up a data layer with a filter on attribute and a filter on user group. The two filters do not combine, and I can't filter by attribute.

I'm using lizmap 3.8.2 / QGIS server 3.34.11 and QGis desktop 3.28.14

I tried to do a test project for this issue_4071.zip