lizmap-web-client icon indicating copy to clipboard operation
lizmap-web-client copied to clipboard

[Bug]: Attribute table - No features returned if map projection != layer projection & "Limit fetched data" checked

Open mdouchin opened this issue 2 years ago • 1 comments

What is the bug?

No feature is returned if the attribute table of a layer if

  • the layer projection and the map projection differ
  • the option "Limit fetched data to the current map extent and layer visibility" is checked

Steps to reproduce the issue

The LWC code here does not take into account the parameter SRSNAME for the WFS GETFEATURE query

To reproduce, use

  • Create and publish a QGIS project in some projection different from EPSG:3857, for ex EPSG:2154
  • Add a PostgreSQL layer with a projection different from EPSG:3857, for ex EPSG:2154
  • Configure attribute table for this layer
  • Add a external baselayer in the Baselayers tab of the lizmap plugin

The web map will be in EPSG:3857, and the attribute table will try to display the features with a WFS GETFEATURE query with a parameter SRSNAME

Versions

Versions :

  • Lizmap Web Client : 3.7.0-pre
  • Lizmap plugin : master
  • QGIS Desktop : 3.22.8
  • QGIS Server : 3.22.10
  • Py-QGIS-Server : 1.8.3
  • QGIS Server plugin atlasprint : not found
  • QGIS Server plugin lizmap_server : master
  • QGIS Server plugin wfsOutputExtension : not found

Check Lizmap plugin

  • [X] I have done the step just before in the Lizmap QGIS desktop plugin before opening this ticket. Otherwise, my ticket is not considered valid and might get closed.

QGIS server version, only if the section above doesn't mention the QGIS Server version

No response

Operating system

Ubuntu 20.04

Browsers

Firefox

Browsers version

Firefox 104

Relevant log output

No response

mdouchin avatar Sep 01 '22 14:09 mdouchin

@mdouchin LWC 3.6 has the same bug.

ygorigor avatar Sep 07 '22 12:09 ygorigor

i'm waiting a fix before migrating from 3.5 :-(

josemvm avatar Jan 20 '23 14:01 josemvm

@rldhont any hint on this subject (the LWC has been modified since this issue creation, the new link to the code is here) https://github.com/3liz/lizmap-web-client/blob/e34a97c67a657b4eb8f8e3234cda89fe06e49dd2/lizmap/modules/lizmap/lib/Request/WFSRequest.php#L573

mdouchin avatar Jan 20 '23 15:01 mdouchin

hi @rldhont i still have problems with this issue (lwc 3.6.1) in some layers and i don't know why... same srid, same geometry, all in the same project...

josemvm avatar Jan 24 '23 10:01 josemvm

@ygorigor all problems are solved for your layers?

josemvm avatar Jan 24 '23 10:01 josemvm

@ygorigor all problems are solved for your layers?

@josemvm unfortunately no, same as you

ygorigor avatar Jan 24 '23 13:01 ygorigor

hi @rldhont do you plan to fix this problem/regression before next release (3.6.2)? thanks a lot

josemvm avatar Feb 08 '23 10:02 josemvm

@josemvm I fixed the bug described in this issue. Can you provide a project with the bug ?

rldhont avatar Feb 08 '23 12:02 rldhont

@rldhont please check your mailbox thanks

josemvm avatar Feb 08 '23 14:02 josemvm

@josemvm @ygorigor I have found the bug and I have a fix with some tests!

rldhont avatar Feb 08 '23 16:02 rldhont

i'm waiting a fix before migrating from 3.5 :-(

@rldhont thanks a lot! 👍

josemvm avatar Feb 08 '23 16:02 josemvm

@josemvm @ygorigor complete fix with tests https://github.com/3liz/lizmap-web-client/pull/3467

rldhont avatar Feb 09 '23 12:02 rldhont

great!!! :superhero_man:

josemvm avatar Feb 09 '23 16:02 josemvm