-
-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impossibility to edit layers from Lizmap with PSQL #1975
Comments
How is your settings in Lizmap plugin about this edition layer? |
@TecnostudiAmbiente your table has a constraint? |
No, none of the tables we use have constraints. |
@TecnostudiAmbiente this could be the reason that you can not edit PG layer. In my case, it was. |
You should not need additionnal constraint. The primary key should be enough.
|
Thanks @ygorigor & @mdouchin , here following the table we are using:
Nb: Every xxxx values is a unique value but I couldn't report them here I also tried to uncheck the WFS boxes on the project but it didn't work. Thanks |
You must never uncheck WFS in the Fields tab of the layer properties dialog, since WFS is used by Lizmap (+ a PostgreSQL request) to gather the fields and their properties. The primary key field must obviously also been checked |
Good morning @mdouchin, initially the WFS boxes were checked, included the primary key field, I tried to uncheck them because of your previous comment, I thought you were suggesting to uncheck them. Anyway I reverted them back to checked as they were initially and I can confirm that it doesn’t work both ways. |
@TecnostudiAmbiente did you try to edit this table from QGIS Desktop? |
@ygorigor yes, of course, everything works! |
Try to copy all styles from layer, remove It, then re-add the PG layer to Qgis project and paste styles to It. Set again qgis server properties in project file, set lizmap parameters needed and re upload qgis project and lizmap .cfg file to server. Many times i've solved weird lizmap behaviours with PG layers this way. Hope this can help. |
Hi @ocelot73, yes, we did try that, although it didn't work. Should we upgrade to another version, or do we risk having the same issue? We also noticed that this problem is present also in SQLite :( |
Is this issue still valid @tethysgeco ? |
Hi @Gustry, do you need any feedback from us? Probably the only similar case we found in our experience was solved exposing the pkey field as wfs but setting the field hidden in the editing module, so that the sequence (xxxx_id_seq in this case?) could work properly. I hope to remember correctly, a long time is passed.. |
This is indeed very important. Do not hide from WFS important fields, as then Lizmap Web Client will not be aware about this field. Lizmap is downstream compare to QGIS server. It's on the checklist already : 3liz/lizmap-plugin#389 So I'm closing this issue, thanks for the feedback. |
What is the bug?
We can't modify the layers in Lizmap if we use a Postgres DB (this works on shape files).
In Lizmap we are using an admin account and in PSQL we have read and write permissions (we also tried to enable all permission on the DB side), however when we click on the modify icon in the popup or on the same icon in the attributes table a popup error message appears saying:
And of course, we have the primary key inside the DB.
It seems like an old bug you solved #765 but we are using the latest stable version of Lizmap.
Could you help us with this?
Thanks
Steps to reproduce the issue
Expected behavior
We are expecting to be able to modify the layers from Lizmap.
Screenshots and logs
Here the error message:
No error logs are shown in Lizmap:
Environment
The text was updated successfully, but these errors were encountered: