lizmap-web-client: Filter data with form errors

What is the bug?

Filter data with forms errors

Steps to reproduce the issue

Trying to insert a filter form in qgis project for search but it seems have problem in attribute table and localte by layer too.

Expected behavior

Same project, same VM, ecc. but 2 instance of lizmap (3.3 rc and 3.4 pre) give different behavior. I take a simple postgres layer of poligons to make a test work for those tree tools:

  1. locate by layer ( with optional group enabled)
  2. attribute table
  3. filter data with form

Lizmap 3.3 RC 2

  • the filter data form don’t appear in the sx bar menu’, so no filter form.
  • the locate by layer tool go perfect
  • the attribute table go perfect

Lizmap 3.4pre.190426

  • the filter data form appear but don’t work. Render the right form but without data.
  • the locate by layer tool go wrong too, not showing data to select,
  • the attribute table seems to be waiting in a infinite loop

logs

Lizmap 3.3 RC 2 log

2019-06-21 12:16:11	192.168.63.22	warning	2019-06-21 12:16:11	[2]	strpos(): Empty needle	/var/www/lizmap-web-client/lizmap/modules/lizmap/classes/lizmapProject.class.php	438

2019-06-21 12:16:11	192.168.63.22	error	2019-06-21 12:16:11	192.168.63.22	[403]	query non valida (ERRORE:  identificativo delimitato di lunghezza zero a o presso """"
LINE 3: ...pe_leng", "indice_comportamento", "zona_pianura", "", "geom"...
                                                             ^(
        WITH source AS (
         SELECT "id", "id_foglio", "belfiore", "foglio", "comune", "shape_area", "shape_leng", "indice_comportamento", "zona_pianura", "", "geom" AS "geosource" FROM "piano_classifica"."CATASTO_fogli" WHERE True
        )
        --SELECT row_to_json(fc, True) AS geojson
        --FROM (
        --    SELECT
        --        'FeatureCollection' As type,
        --        array_to_json(array_agg(f)) As features
        SELECT row_to_json(f, True) AS geojson
            FROM (
                SELECT
                    'Feature' AS type,
         Concat(
            'CATASTO_fogli',
            '.',
            "") AS id,
                        ST_AsGeoJSON(ST_Transform(ST_Envelope(lg.geosource::geometry), 4326))::json As geometry,
            
                    row_to_json(
                        ( SELECT l FROM
                            (
                                SELECT "id", "id_foglio", "belfiore", "foglio", "comune", "shape_area", "shape_leng", "indice_comportamento", "zona_pianura", ""
                            ) As l
                        )
                    ) As properties
                FROM source As lg
            ) As f
        --) As fc))	/var/www/lizmap-web-client/lib/jelix/plugins/db/pgsql/pgsql.dbconnection.php	174
	/intragis/index.php/lizmap/service/?repository=2&project=test
array (   'repository' => '2',   'project' => 'test',   'module' => 'lizmap',   'action' => 'service:index',   'SERVICE' => 'WFS',   'VERSION' => '1.0.0',   'REQUEST' => 'GetFeature',   'TYPENAME' => 'CATASTO_fogli',   'OUTPUTFORMAT' => 'GeoJSON',   'GEOMETRYNAME' => 'extent', )

	0	pgsqlDbConnection->_doQuery()	/var/www/lizmap-web-client/lib/jelix/db/jDbConnection.class.php : 123
	1	jDbConnection->query()	/var/www/lizmap-web-client/lizmap/modules/lizmap/classes/lizmapWFSRequest.class.php : 382
	2	lizmapWFSRequest->getfeaturePostgres()	/var/www/lizmap-web-client/lizmap/modules/lizmap/classes/lizmapWFSRequest.class.php : 137
	3	lizmapWFSRequest->getfeature()	/var/www/lizmap-web-client/lizmap/modules/lizmap/classes/lizmapOGCRequest.class.php : 71
	4	lizmapOGCRequest->process()	/var/www/lizmap-web-client/lizmap/modules/lizmap/controllers/service.classic.php : 1282
	5	serviceCtrl->GetFeature()	/var/www/lizmap-web-client/lizmap/modules/lizmap/controllers/service.classic.php : 99
	6	serviceCtrl->index()	/var/www/lizmap-web-client/lib/jelix/core/jCoordinator.class.php : 225
	7	jCoordinator->process()	/var/www/lizmap-web-client/lizmap/www/index.php : 23
2019-06-21 12:16:11	192.168.63.22	warning	2019-06-21 12:16:11	[2]	strpos(): Empty needle	/var/www/lizmap-web-client/lizmap/modules/lizmap/classes/lizmapProject.class.php	438

2019-06-21 12:16:11	192.168.63.22	warning	2019-06-21 12:16:11	[2]	strpos(): Empty needle	/var/www/lizmap-web-client/lizmap/modules/lizmap/classes/lizmapProject.class.php	438

Lizmap 3.4pre.190426 log

2019-06-21 12:31:24	192.168.63.22	notice	2019-06-21 12:31:24	[8]	Undefined offset: 11	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php	183
2019-06-21 12:31:24	192.168.63.22	notice	2019-06-21 12:31:24	[8]	Undefined offset: 12	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php	184
2019-06-21 12:31:24	192.168.63.22	notice	2019-06-21 12:31:24	[8]	Undefined offset: 13	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php	185
2019-06-21 12:31:24	192.168.63.22	notice	2019-06-21 12:31:24	[8]	Undefined offset: 14	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php	186
2019-06-21 12:31:24	192.168.63.22	notice	2019-06-21 12:31:24	[8]	Undefined offset: 15	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php	187
2019-06-21 12:31:24	192.168.63.22	error	2019-06-21 12:31:24	[0]	dbtools, pgsql: unknown table	/var/www/lizmap_devel/lib/jelix/plugins/db/pgsql/pgsql.dbtools.php	242
2019-06-21 12:31:24	192.168.63.22	warning	2019-06-21 12:31:24	[2]	strpos(): Empty needle	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/lizmapProject.class.php	422
2019-06-21 12:31:24	192.168.63.22	warning	2019-06-21 12:31:24	[2]	strpos(): Empty needle	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/lizmapProject.class.php	422
2019-06-21 12:31:24	192.168.63.22	warning	2019-06-21 12:31:24	[2]	strpos(): Empty needle	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/lizmapProject.class.php	422
2019-06-21 12:31:25	192.168.63.22	warning	2019-06-21 12:31:25	[2]	strpos(): Empty needle	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/lizmapProject.class.php	422
2019-06-21 12:31:25	192.168.63.22	warning	2019-06-21 12:31:25	[2]	strpos(): Empty needle	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/lizmapProject.class.php	422
2019-06-21 12:31:25	192.168.63.22	warning	2019-06-21 12:31:25	[2]	strpos(): Empty needle	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/lizmapProject.class.php	422
2019-06-21 12:31:40	192.168.63.22	warning	2019-06-21 12:31:40	[2]	strpos(): Empty needle	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/lizmapProject.class.php	422
2019-06-21 12:31:40	192.168.63.22	warning	2019-06-21 12:31:40	[2]	strpos(): Empty needle	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/lizmapProject.class.php	422
2019-06-21 12:31:40	192.168.63.22	notice	2019-06-21 12:31:40	[8]	Undefined offset: 13	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php	163
2019-06-21 12:31:40	192.168.63.22	notice	2019-06-21 12:31:40	[8]	Undefined offset: 7	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php	179
2019-06-21 12:31:40	192.168.63.22	notice	2019-06-21 12:31:40	[8]	Undefined offset: 8	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php	180
2019-06-21 12:31:40	192.168.63.22	notice	2019-06-21 12:31:40	[8]	Undefined offset: 9	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php	181
2019-06-21 12:31:40	192.168.63.22	notice	2019-06-21 12:31:40	[8]	Undefined offset: 10	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php	182
2019-06-21 12:31:40	192.168.63.22	notice	2019-06-21 12:31:40	[8]	Undefined offset: 11	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php	183
2019-06-21 12:31:40	192.168.63.22	notice	2019-06-21 12:31:40	[8]	Undefined offset: 12	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php	184
2019-06-21 12:31:40	192.168.63.22	notice	2019-06-21 12:31:40	[8]	Undefined offset: 13	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php	185
2019-06-21 12:31:40	192.168.63.22	notice	2019-06-21 12:31:40	[8]	Undefined offset: 14	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php	186
2019-06-21 12:31:40	192.168.63.22	notice	2019-06-21 12:31:40	[8]	Undefined offset: 15	/var/www/lizmap_devel/lizmap/modules/lizmap/classes/qgisVectorLayer.class.php	187
2019-06-21 12:31:40	192.168.63.22	error	2019-06-21 12:31:40	[0]	dbtools, pgsql: unknown table	/var/www/lizmap_devel/lib/jelix/plugins/db/pgsql/pgsql.dbtools.php	242

Environment

Debian 9, Apache 2.4.25, php 7, postgresql 9.6, postgis 2.3.1, qgis server 3.4.8 Qgis 3.6.3 for editing project

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 17 (2 by maintainers)

Most upvoted comments

@buoncri Does issue still occur with LWC 3.3.3 ? Other issues have to be opened separately please.

The filter is based on SQL request directly on database. It does not use QGIS capabilities.

Thanks, I will check and report asap

@buoncri Thanks for the update. Does it work as expected ?