-
Notifications
You must be signed in to change notification settings - Fork 10
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
White screen after inserting feature with id field hidden #25
Comments
Can you post the full stack trace from the JS console (F12)? Make sure you are either running through a webpack dev server or a prod build with source-maps
Features are queried with a 10px tolerance, see https://github.com/qgis/qwc2/blob/master/utils/EditingInterface.js#L60
You should set the display field (QGIS -> layer properties -> display -> display name) to a non-hidden field
Please use the lastest qwc-data-service (v2023.10.12) |
Yes! There are multiple errors, all of them occur when I commit the feature:
Hmm, I'll look more into it, because no matter where I click it finds all the features |
I take the id is |
Yes, the id is null, but the geometry is correct I think |
My guess is that since you are using a view, and a view cannot have a primary key, the data-service won't be able to return an id for the feature (hence null) and hence everything else falls down as well. In short, editing on views is currently unsupported. |
Okay, I understand. Well, I'll see what I can do to work around this. Thanks anyway for the quick responses! |
@mwa @HusseinKabbout - we have been recently discussing this AFAI remember. You might want to shortcircuit with @manisandro ... ! |
@smaspons As you are working on postgres, you might try defining a default value on the view
|
Hi!
So I have a layer (postgresql view) that has a few fields and they all are filled by a trigger in database. In the QGIS project I have all the fields set to hidden so I can insert features without inputing any fields (the trigger handles them).
I'm trying to do this in QWC2 via the Editing plugin and I have a few problems:
Uncaught TypeError: id is null
ERROR: source for a multiple-column UPDATE item must be a sub-SELECT or ROW() expression
, which I'm guessing is solved with the last commit.Just so you know, I'm using the docker image:
sourcepole/qwc-data-service:v2023.1-lts
and the latest commit ofqwc2
for the app.Please, let me know if you need more details.
Thanks!
The text was updated successfully, but these errors were encountered: