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
259 stars 143 forks source link

Error in /var/log/errors.log when adding new feature on PostGIS layer #1297

Closed nboisteault closed 1 year ago

nboisteault commented 5 years ago

Steps to reproduce the issue

  1. Open edition menu
  2. Click on 'Add' to add a feature
  3. Watch /var/log/errors.log
  4. See error

Screenshots and logs

`2019-07-24 10:19:51 10.0.2.2 error 2019-07-24 10:19:51 10.0.2.2 [403] Erreur dans la requête (ERREUR: syntaxe en entrée invalide pour l'entier : « » LINE 3: ...T "id" FROM "public"."layer_simple" WHERE True AND "id" = '' ^( WITH source AS ( SELECT "id" FROM "public"."layer_simple" WHERE True AND "id" = '' ) --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( 'layer_simple', '.', "id") AS id, Null As geometry,

                row_to_json(
                    ( SELECT l FROM
                        (
                            SELECT "id"
                        ) As l
                    )
                ) As properties
            FROM source As lg
        ) As f
    --) As fc)) /lizmap_web_client/lib/jelix/plugins/db/pgsql/pgsql.dbconnection.php    174
/index.php/lizmap/edition/editFeature?project=test-issues-scratch-2-18&repository=test218&layerId=layer_simple20190614085002252&status=0

array ( 'project' => 'test-issues-scratch-2-18', 'repository' => 'test218', 'layerId' => 'layer_simple20190614085002252', 'status' => '0', 'module' => 'lizmap', 'action' => 'edition:editFeature', )

0   pgsqlDbConnection->_doQuery()   /lizmap_web_client/lib/jelix/db/jDbConnection.class.php : 123
1   jDbConnection->query()  /lizmap_web_client/lizmap/modules/lizmap/classes/lizmapWFSRequest.class.php : 382
2   lizmapWFSRequest->getfeaturePostgres()  /lizmap_web_client/lizmap/modules/lizmap/classes/lizmapWFSRequest.class.php : 137
3   lizmapWFSRequest->getfeature()  /lizmap_web_client/lizmap/modules/lizmap/controllers/edition.classic.php : 242
4   editionCtrl->getWfsFeature()    /lizmap_web_client/lizmap/modules/lizmap/controllers/edition.classic.php : 365
5   editionCtrl->editFeature()  /lizmap_web_client/lib/jelix/core/jCoordinator.class.php : 225
6   jCoordinator->process() /lizmap_web_client/lizmap/www/index.php : 23

`

Environment

Gustry commented 1 year ago

Is this issue still valid @nboisteault ?