Lizmap-web-client: edition freezes with postgresql - related tables (spatial/non-spatial related tables)

Created on 15 Jan 2018  路  17Comments  路  Source: 3liz/lizmap-web-client

hi

after refactoring edition controller (master branch), i have detect some issues:

  • using popup on main features:

2018-01-15 14:40:32 10.27.11.245 notice 2018-01-15 14:40:32 [8] Only variables should be passed by reference /var/www/html/lizmap-web-client-master/lizmap/modules/view/classes/popup.class.php 125

  • attribute table, slecting main feature:

2018-01-15 14:54:56 10.27.11.245 error query inv谩lida (ERROR: zero-length delimited identifier at or near """"
LINE 3: ...M "public"."aach_da" WHERE True AND ST_Intersects("", ST_Mak...
^(
WITH source AS (
SELECT "cod_analise", "cod_ponto", "ano", "trimestre", "data_amost", "pa_regulat", "codigo_ana", "control_ty", "edital", "rel_ensaio", "edital_liz", "rel_ensaio_liz" FROM "public"."aach_da" WHERE True AND ST_Intersects("", ST_MakeEnvelope(-7.785965,38.789121,-7.781754,38.791201, 4326)) AND "cod_ponto" = '11'
)
--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(
'aach_da',
'.',
"cod_analise") AS id,
row_to_json(
( SELECT l FROM
(
SELECT "cod_analise", "cod_ponto", "ano", "trimestre", "data_amost", "pa_regulat", "codigo_ana", "control_ty", "edital", "rel_ensaio", "edital_liz", "rel_ensaio_liz"
) As l
)
) As properties
FROM source As lg
) As f
--) As fc))

  • editing from attribute table:

the editor waiter sometimes freezes and crashes the lwc, however the transaction is performed

thanks

bug

All 17 comments

Problem about double quotes?
_You want single quotes not double quotes around strings, double quotes
make delimited identifiers, and "" isn't a meaningful identifier._

So it's a QGIS server error?

hi @jlstanus

it's a lizmap error
lizmap-web-client-master/lizmap/var/log/error.log

imagem

How to reproduce this issue ?

@rldhont you can see these sql errors using my url and credentials that i sent to you yesterday

@josemvm I don't understand what you mean by attribute table, slecting main feature and editing from attribute table. Can you give me the way to reproduce the freeze ?

@rldhont the freeze situation only happens sometimes (after refactoring edition controller)...

I don't understand what you mean by attribute table, slecting main feature and editing from attribute table

but when you click on Data tool, "Pontos de Amostragem", Detail, any feature - these sql errors occur, before freezing:

2018-07-04` 15:48:48     62.28.13.34     error   invalid query (ERROR:  zero-length delimited identifier at or near """"
LINE 3: ...M "public"."aach_da" WHERE True AND ST_Intersects("", ST_Mak...
                                                             ^(
        WITH source AS (
         SELECT "cod_analise", "cod_ponto", "ano", "trimestre", "data_amost", "pa_regulat", "codigo_ana", "control_ty", "edital", "rel_ensaio", "edital_liz", "rel_ensaio_liz" FROM "public"."aach_da" WHERE True AND ST_Intersects("", ST_MakeEnvelope(-8.222516,38.636158,-7.683499,38.901964, 4326)) AND "cod_ponto" = '1'
        )
        --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(
            'aach_da',
            '.',
            "cod_analise") AS id,
                        Null As geometry,
                    row_to_json(
                        ( SELECT l FROM
                            (
                                SELECT "cod_analise", "cod_ponto", "ano", "trimestre", "data_amost", "pa_regulat", "codigo_ana", "control_ty", "edital", "rel_ensaio", "edital_liz", "rel_ensaio_liz"
                            ) As l
                        )
                    ) As properties
                FROM source As lg
            ) As f
        --) As fc))

after that, click on edition and edit a child - on this behavior the editor waiter sometimes freezes and crashes the lwc

i don't know if you can have sql errors on Firefox Developer Tools...

you can see these logs in LWC, admin, logs
these errors happen after refactoring editon controller and this doesn麓t happen in the 3.1 ver.

imagem

i think these errors are the cause of the problem "freeze and crash"...

@gioman can you test 04ac82821565f570b0071a5049a50b62774216a9 ?

@rldhont in my case the error has disappeared
soon i will explore my project and ASAP i will give you feedback

thanks

hi @rldhont

after some tests, i have checked that the edition waiter doesn't close...
the transaction is completed and there are no errors in lizmap errors.log file

imagem

thanks

can you take a look at the requests with de browser dev tools ?

please, check your mailbox

very nice! thanks a lot @rldhont :-)

@josemvm you can update your install

Was this page helpful?
0 / 5 - 0 ratings

Related issues

josemvm picture josemvm  路  13Comments

saeri-ims picture saeri-ims  路  12Comments

t0xycus picture t0xycus  路  7Comments

danzig666 picture danzig666  路  10Comments

josemvm picture josemvm  路  13Comments