Open nboisteault opened 3 years ago
@rldhont it is very strange, I can't reproduce the bug now.
It is failing randomly in CI : https://github.com/3liz/lizmap-web-client/runs/3961535775?check_suite_focus=true#step:9:91
I cannot test http://localhost:8130/index.php/view/map/?repository=testsrepository&project=filter_layer_data_by_polygon_for_groups : Vous n'avez pas les droits pour voir ce répertoire de cartes.
Using credentials: admin/admin
Add rights for admins group for testsrepository
in http://localhost:8130/admin.php/admin/maps/
request:
MAP=private/lwc_2541/filter_layer_data_by_polygon_for_groups
SERVICE=WFS
VERSION=1.0.0
REQUEST=GetFeature
TYPENAME=shop_bakery
OUTPUTFORMAT=GeoJSON
GEOMETRYNAME=extent
LIZMAP_OVERRIDE_FILTER=0
LIZMAP_USER=user_in_group_a
LIZMAP_USER_GROUPS=group_a%2C+__priv_user_in_group_a%2C+users
Qgis 3.16
No issue to report, features are always fetched:
{
type: FeatureCollection,
bbox: [
3.77,
43.56,
3.94,
43.68
],
features: [
{
bbox: [
3.913073,
43.659122,
3.913073,
43.659122
],
geometry: {
coordinates: [
[
[
3.913073,
43.659122
],
[
3.913073,
43.659122
],
[
3.913073,
43.659122
],
[
3.913073,
43.659122
],
[
3.913073,
43.659122
]
]
],
type: Polygon
},
id: shop_bakery.0,
properties: {
id: 1
},
type: Feature
},
etc ...
Same thing, no issue to report.
@nboisteault
Add rights for admins group for testsrepository in http://localhost:8130/admin.php/admin/maps/
There is no testsrepository
in admin.
@dmarteau ping me, we'll look to this issue.
@dmarteau, in docker stack for test :
curl 'http://map:8080/ows/?geometryname=extent&map=tests%2Ffilter%5Flayer%5Fdata%5Fby%5Fpolygon%5Ffor%5Fgroups%2Eqgs&outputformat=GeoJSON&request=getfeature&service=WFS&typename=shop%5Fbakery&version=1%2E0%20&Lizmap%5FUser=admin&Lizmap%5FUser%5FGroups=%5F%5Fpriv%5Fadmin%2C%20admins&Lizmap%5FOverride%5FFilter=0'
returns
{"type": "FeatureCollection",
"bbox": [ 3.77, 43.56, 3.94, 43.68],
"features": [
]
@rldhont @mdouchin same request with Lizmap%5FOverride%5FFilter=1
curl 'http://map:8080/ows/?geometryname=extent&map=tests%2Ffilter%5Flayer%5Fdata%5Fby%5Fpolygon%5Ffor%5Fgroups%2Eqgs&outputformat=GeoJSON&request=getfeature&service=WFS&typename=shop%5Fbakery&version=1%2E0%20&Lizmap%5FUser=admin&Lizmap%5FUser%5FGroups=%5F%5Fpriv%5Fadmin%2C%20admins&Lizmap%5FOverride%5FFilter=1'
returns
{"type": "FeatureCollection",
"bbox": [ 3.77, 43.56, 3.94, 43.68],
"features": [
{"bbox":[3.913073,43.659122,3.913073,43.659122],"geometry":{"coordinates":[[[3.913073,43.659122],[3.913073,43.659122],[3.913073,43.659122],[3.913073,43.659122],[3.913073,43.659122]]],"type":"Polygon"},"id":"shop_bakery.0","properties":{"id":1,"polygon_id":null},"type":"Feature"}
,{"bbox":[3.811568,43.653714,3.811568,43.653714],"geometry":{"coordinates":[[[3.811568,43.653714],[3.811568,43.653714],[3.811568,43.653714],[3.811568,43.653714],[3.811568,43.653714]]],"type":"Polygon"},"id":"shop_bakery.1","properties":{"id":16,"polygon_id":0},"type":"Feature"}
,{"bbox":[3.860864,43.664591,3.860864,43.664591],"geometry":{"coordinates":[[[3.860864,43.664591],[3.860864,43.664591],[3.860864,43.664591],[3.860864,43.664591],[3.860864,43.664591]]],"type":"Polygon"},"id":"shop_bakery.2","properties":{"id":68,"polygon_id":2},"type":"Feature"}
,{"bbox":[3.803876,43.577272,3.803876,43.577272],"geometry":{"coordinates":[[[3.803876,43.577272],[3.803876,43.577272],[3.803876,43.577272],[3.803876,43.577272],[3.803876,43.577272]]],"type":"Polygon"},"id":"shop_bakery.3","properties":{"id":69,"polygon_id":6},"type":"Feature"}
,{"bbox":[3.904609,43.602678,3.904609,43.602678],"geometry":{"coordinates":[[[3.904609,43.602678],[3.904609,43.602678],[3.904609,43.602678],[3.904609,43.602678],[3.904609,43.602678]]],"type":"Polygon"},"id":"shop_bakery.4","properties":{"id":73,"polygon_id":5},"type":"Feature"}
,{"bbox":[3.844422,43.596471,3.844422,43.596471],"geometry":{"coordinates":[[[3.844422,43.596471],[3.844422,43.596471],[3.844422,43.596471],[3.844422,43.596471],[3.844422,43.596471]]],"type":"Polygon"},"id":"shop_bakery.5","properties":{"id":79,"polygon_id":5},"type":"Feature"}
,{"bbox":[3.835329,43.577769,3.835329,43.577769],"geometry":{"coordinates":[[[3.835329,43.577769],[3.835329,43.577769],[3.835329,43.577769],[3.835329,43.577769],[3.835329,43.577769]]],"type":"Polygon"},"id":"shop_bakery.6","properties":{"id":99,"polygon_id":3},"type":"Feature"}
,{"bbox":[3.850837,43.683412,3.850837,43.683412],"geometry":{"coordinates":[[[3.850837,43.683412],[3.850837,43.683412],[3.850837,43.683412],[3.850837,43.683412],[3.850837,43.683412]]],"type":"Polygon"},"id":"shop_bakery.7","properties":{"id":102,"polygon_id":null},"type":"Feature"}
,{"bbox":[3.878482,43.655109,3.878482,43.655109],"geometry":{"coordinates":[[[3.878482,43.655109],[3.878482,43.655109],[3.878482,43.655109],[3.878482,43.655109],[3.878482,43.655109]]],"type":"Polygon"},"id":"shop_bakery.8","properties":{"id":103,"polygon_id":1},"type":"Feature"}
,{"bbox":[3.89268,43.656244,3.89268,43.656244],"geometry":{"coordinates":[[[3.89268,43.656244],[3.89268,43.656244],[3.89268,43.656244],[3.89268,43.656244],[3.89268,43.656244]]],"type":"Polygon"},"id":"shop_bakery.9","properties":{"id":119,"polygon_id":1},"type":"Feature"}
,{"bbox":[3.868088,43.603732,3.868088,43.603732],"geometry":{"coordinates":[[[3.868088,43.603732],[3.868088,43.603732],[3.868088,43.603732],[3.868088,43.603732],[3.868088,43.603732]]],"type":"Polygon"},"id":"shop_bakery.10","properties":{"id":126,"polygon_id":5},"type":"Feature"}
,{"bbox":[3.804697,43.61133,3.804697,43.61133],"geometry":{"coordinates":[[[3.804697,43.61133],[3.804697,43.61133],[3.804697,43.61133],[3.804697,43.61133],[3.804697,43.61133]]],"type":"Polygon"},"id":"shop_bakery.11","properties":{"id":140,"polygon_id":7},"type":"Feature"}
,{"bbox":[3.924303,43.635591,3.924303,43.635591],"geometry":{"coordinates":[[[3.924303,43.635591],[3.924303,43.635591],[3.924303,43.635591],[3.924303,43.635591],[3.924303,43.635591]]],"type":"Polygon"},"id":"shop_bakery.12","properties":{"id":143,"polygon_id":9},"type":"Feature"}
,{"bbox":[3.913397,43.635438,3.913397,43.635438],"geometry":{"coordinates":[[[3.913397,43.635438],[3.913397,43.635438],[3.913397,43.635438],[3.913397,43.635438],[3.913397,43.635438]]],"type":"Polygon"},"id":"shop_bakery.13","properties":{"id":151,"polygon_id":9},"type":"Feature"}
,{"bbox":[3.766922,43.579735,3.766922,43.579735],"geometry":{"coordinates":[[[3.766922,43.579735],[3.766922,43.579735],[3.766922,43.579735],[3.766922,43.579735],[3.766922,43.579735]]],"type":"Polygon"},"id":"shop_bakery.14","properties":{"id":155,"polygon_id":null},"type":"Feature"}
,{"bbox":[3.793696,43.561103,3.793696,43.561103],"geometry":{"coordinates":[[[3.793696,43.561103],[3.793696,43.561103],[3.793696,43.561103],[3.793696,43.561103],[3.793696,43.561103]]],"type":"Polygon"},"id":"shop_bakery.15","properties":{"id":157,"polygon_id":null},"type":"Feature"}
,{"bbox":[3.93703,43.649574,3.93703,43.649574],"geometry":{"coordinates":[[[3.93703,43.649574],[3.93703,43.649574],[3.93703,43.649574],[3.93703,43.649574],[3.93703,43.649574]]],"type":"Polygon"},"id":"shop_bakery.16","properties":{"id":158,"polygon_id":8},"type":"Feature"}
,{"bbox":[3.894293,43.572141,3.894293,43.572141],"geometry":{"coordinates":[[[3.894293,43.572141],[3.894293,43.572141],[3.894293,43.572141],[3.894293,43.572141],[3.894293,43.572141]]],"type":"Polygon"},"id":"shop_bakery.17","properties":{"id":163,"polygon_id":4},"type":"Feature"}
,{"bbox":[3.897565,43.580337,3.897565,43.580337],"geometry":{"coordinates":[[[3.897565,43.580337],[3.897565,43.580337],[3.897565,43.580337],[3.897565,43.580337],[3.897565,43.580337]]],"type":"Polygon"},"id":"shop_bakery.18","properties":{"id":168,"polygon_id":4},"type":"Feature"}
,{"bbox":[3.922375,43.639475,3.922375,43.639475],"geometry":{"coordinates":[[[3.922375,43.639475],[3.922375,43.639475],[3.922375,43.639475],[3.922375,43.639475],[3.922375,43.639475]]],"type":"Polygon"},"id":"shop_bakery.19","properties":{"id":173,"polygon_id":9},"type":"Feature"}
,{"bbox":[3.896339,43.632993,3.896339,43.632993],"geometry":{"coordinates":[[[3.896339,43.632993],[3.896339,43.632993],[3.896339,43.632993],[3.896339,43.632993],[3.896339,43.632993]]],"type":"Polygon"},"id":"shop_bakery.20","properties":{"id":174,"polygon_id":9},"type":"Feature"}
,{"bbox":[3.820083,43.574158,3.820083,43.574158],"geometry":{"coordinates":[[[3.820083,43.574158],[3.820083,43.574158],[3.820083,43.574158],[3.820083,43.574158],[3.820083,43.574158]]],"type":"Polygon"},"id":"shop_bakery.21","properties":{"id":181,"polygon_id":3},"type":"Feature"}
,{"bbox":[3.849871,43.620122,3.849871,43.620122],"geometry":{"coordinates":[[[3.849871,43.620122],[3.849871,43.620122],[3.849871,43.620122],[3.849871,43.620122],[3.849871,43.620122]]],"type":"Polygon"},"id":"shop_bakery.22","properties":{"id":195,"polygon_id":5},"type":"Feature"}
,{"bbox":[3.942209,43.641274,3.942209,43.641274],"geometry":{"coordinates":[[[3.942209,43.641274],[3.942209,43.641274],[3.942209,43.641274],[3.942209,43.641274],[3.942209,43.641274]]],"type":"Polygon"},"id":"shop_bakery.23","properties":{"id":197,"polygon_id":8},"type":"Feature"}
,{"bbox":[3.90324,43.663094,3.90324,43.663094],"geometry":{"coordinates":[[[3.90324,43.663094],[3.90324,43.663094],[3.90324,43.663094],[3.90324,43.663094],[3.90324,43.663094]]],"type":"Polygon"},"id":"shop_bakery.24","properties":{"id":199,"polygon_id":null},"type":"Feature"}
]
See all the data of the filtered layers (attribute or spatial filters)
is not checked for this repository.
When I display attribute table for shop_bakery
twice, one is OK other NOK, there are differences in log :
Lizmap layerFilterExpression
is not present at right.
Bug occurs once every four times. Docker stack is configured with QGSRV_SERVER_WORKERS: 4
.
Any idea how to fix this @rldhont @mdouchin @dmarteau ?
I confirm there is no bug with QGSRV_SERVER_WORKERS: 1
Some users also reported random errors in the editing tool, related to some WFS requests on error. Not easy to reproduce though.
Perhaps a bug with the filter cache in the plugin cc @Gustry or in LWC ? We could disable the cache et test again
@nboisteault I cannot reproduce the bug :(. Or more correct, I was able to reproduce it one time, then I restarted my docker containers, and then I could not anymore.
Note that it is completely normal that your curl command below does not return the data, since the Polygons layer groups
fields does not contain the admins
group. For admins, this is simpler if they just check the corresponding checkbox for the repository, which corresponds to this LIZMAP_OVERRIDE_FILTER
parameter
curl 'http://map:8080/ows/?geometryname=extent&map=tests%2Ffilter%5Flayer%5Fdata%5Fby%5Fpolygon%5Ffor%5Fgroups%2Eqgs&outputformat=GeoJSON&request=getfeature&service=WFS&typename=shop%5Fbakery&version=1%2E0%20&Lizmap%5FUser=admin&Lizmap%5FUser%5FGroups=%5F%5Fpriv%5Fadmin%2C%20admins&Lizmap%5FOverride%5FFilter=0'
Could you please tell us with which user did you try ? admin
or user_in_group_a
?
@mdouchin Gif was made when logged as user_in_group_a
.
What is the bug?
Attribute table features are displaying randomly with
filter_layer_data_by_polygon_for_groups
test project. This cause https://github.com/3liz/lizmap-web-client/blob/master/tests/end2end/cypress/integration/filter_layer_data_by_polygon_for_groups_spec.js#L138 to fail randomly.Steps to reproduce the issue
https://user-images.githubusercontent.com/2145040/137699333-76bb7240-93ae-4755-8082-d2bb61005784.mp4
Lizmap version
master
QGIS desktop version
3.16.11
QGIS server version
3.16.11
Operating system
Ubuntu
Browsers
Chrome
Browsers version
94
Relevant log output
Logs with empty array for features :