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

Error with "form filter" tool on a GeoPackage

Open katagen opened this issue 10 months ago • 6 comments

What is the bug? (in English)

I have a projet which works perfectly, also the filter option. But in my log panel, when I use the filter, which works, I have this error: 2024-04-19 10:05:49 192.168.200.1 lizmapadmin Erreur dans la requête (no such function: GeomFromGPB ( SELECT AsGeoJSON(Extent(Transform(GeomFromGPB("geom"), 2056)), 8, 1) AS bbox FROM mamm WHERE 2>1 AND ( "Famille" IN ( 'Felidae' ) )))

What does it mean?

Steps to reproduce the issue

See above.

Versions, safeguards, check summary etc

Versions :

  • Lizmap Web Client : 3.7.6
  • Lizmap plugin : 4.3.6
  • QGIS Desktop : 3.34.5
  • QGIS Server : 3.34.5
  • Py-QGIS-Server : not used
  • QGIS Server plugin atlasprint : 3.3.2
  • QGIS Server plugin lizmap_server : 2.8.6
  • QGIS Server plugin wfsOutputExtension : 1.8.0
List of safeguards :
  • Mode : normal
  • Allow parent folder : no
  • Prevent other drive : yes
  • Prevent PG service : no
  • Prevent PG Auth DB : yes
  • Force PG user&pass : yes
  • Prevent ECW : yes

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.

Operating system

Ubuntu 22.04

Browsers

Firefox, Chrome, Safari

Browsers version

LTR

Relevant log output

2024-04-19 10:05:49	192.168.200.1	lizmapadmin	Erreur dans la requête (no such function: GeomFromGPB ( SELECT AsGeoJSON(Extent(Transform(GeomFromGPB("geom"), 2056)), 8, 1) AS bbox FROM mamm WHERE 2>1 AND ( "Famille" IN ( 'Felidae' ) )))

katagen avatar Apr 19 '24 08:04 katagen

Did you look on the internet ?

no such function: GeomFromGPB

Looks like linked to Spatialite/GPKG ? Is-it your case ?

Gustry avatar Apr 24 '24 13:04 Gustry

I have seen that it is liked to geopackage, but what I don't understand it is why I have this error. In your documentation, it is specified that 'form filtering' wokrs with Geopackage. works So I have a Geopackage, with the layer "mamm" inside. The primary key is "fid". gpkg In the plugin, I set the form filtering like that: plugin On the webpage, I have the filter panel, which works, and the filtering is working (a bit slow). The filter panel with no filter selected: sans With only the insectivora order selected: avec So I don't understand the error...

katagen avatar Apr 24 '24 14:04 katagen

Did you install the php spatialite extension http://www.gaia-gis.it/gaia-sins/spatialite-cookbook-fr/html/php.html ?

arno974 avatar May 23 '24 06:05 arno974

I have install the package php-sqlite3... but it is said nowhere to change the php.ini file (not in Qgis server installation manual, or in Lizmap)?!?

And It seems to works... I just have the error message?!? And I use geopackage, not sqlite... or did I miss something?

katagen avatar May 26 '24 14:05 katagen

And It seems to works... I just have the error message?!?

What do you mean, does it work ? Geopackage is a subset of sqlite because a Geopackage file IS a sqlite file. A package php-sqlite3 won't be written in QGIS Server doc, QGIS is not using PHP. I see this package mentioned in the documentation https://docs.lizmap.com/current/en/install/linux.html

Gustry avatar May 28 '24 08:05 Gustry

As you can see in the screenshots, the filtering is working... but I have the error message in the panle of Lizmap. The error message only appears when I use the "form filter" tool on geopackage layers

I have installed php-sqlite3. What I didn't do, is to edit the php.ini file, as mentioned here: https://www.gaia-gis.it/gaia-sins/spatialite-cookbook-fr/html/php.html

Cause in Lizmap documentation, it is for "editing" spatialite layers, which I don't use (only geopackage and PostGIS layers).

katagen avatar May 29 '24 06:05 katagen