Skip to content
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

Feature Not Saved after edit it ( Last Update ) #4693

Closed
abdullamuthana opened this issue Oct 26, 2023 · 16 comments
Closed

Feature Not Saved after edit it ( Last Update ) #4693

abdullamuthana opened this issue Oct 26, 2023 · 16 comments

Comments

@abdullamuthana
Copy link

Describe the issue

if there is any feature on the map then i want to edit the feature after that the edit i have done not save

Observed behavior

When i try to edit any feature on the map it said Changes Saved but it's not saved

Screenshots and GIFs

Already Added

[Please also attach additional files if a
Error Message
specific project/dataset is useful to investigate the problem.]

Desktop (please complete the following information)

Qfield Last Update

Mobile (please complete the following information)

  • Device: [iPhone13 pro max]
  • OS: [Android 11]
  • QField version: 3.0.4 - Amazonia

Additional information

  • Problem started happening recently, didn't happen in an older version of QField: Yes
  • Problem can be reliably reproduced, doesn't happen randomly: Yes
  • Problem happens with all files and projects, not only some files or projects: Yes All
@nirvn
Copy link
Member

nirvn commented Oct 26, 2023

@abdullamuthana , can you share a sample project? I'm unable to replicate with the sample bees project shipped with QField.

@abdullamuthana
Copy link
Author

test.zip
Sure you can use this one and try to edit something in PO layer

@abdullamuthana , can you share a sample project? I'm unable to replicate with the sample bees project shipped with QField.

@nirvn
Copy link
Member

nirvn commented Oct 27, 2023

@abdullamuthana , thanks this is helpful.

Turns out that the problem has to do with your geopackage structure. For some reason, your feature ID column in your layers are name-less, i.e.:

image

This results in QGIS/gdal not being able to add the feature ID column when sorting features. In QField 3.0, we now sort feature lists, which means in your case that editing sorted features results in a missing ID needed to save the edits.

My suggestion is to simply edit your geopackage and name the fid columns "fid" (you can do that easily using the open source sqlite browser application) That fixes the situation.

You could also file an issue upstream in QGIS, but in this case I think name-less columns is the problem, not QGIS :)

@nirvn nirvn closed this as completed Oct 27, 2023
@abdullamuthana
Copy link
Author

@abdullamuthana , thanks this is helpful.

Turns out that the problem has to do with your geopackage structure. For some reason, your feature ID column in your layers are name-less, i.e.:

image

This results in QGIS/gdal not being able to add the feature ID column when sorting features. In QField 3.0, we now sort feature lists, which means in your case that editing sorted features results in a missing ID needed to save the edits.

My suggestion is to simply edit your geopackage and name the fid columns "fid" (you can do that easily using the open source sqlite browser application) That fixes the situation.

You could also file an issue upstream in QGIS, but in this case I think name-less columns is the problem, not QGIS :)

You mean the issue happen because the id column is NULL ?

@nirvn
Copy link
Member

nirvn commented Oct 27, 2023

@abdullamuthana , no, I mean the issue is happening because your fid index column has an empty name (i.e. the "" INTEGER NOT NULL line).

@abdullamuthana
Copy link
Author

but why the same project file was working without any problem before the update ?

@abdullamuthana
Copy link
Author

I got ur idea you mean this is because the first column show as - which mean no name
image

@nirvn
Copy link
Member

nirvn commented Oct 27, 2023

@abdullamuthana , prior to QField 3.0, we were not sorting feature lists (eg the list you get when identifying features through tapping on the screen).

Your malformed geopackage leads to the loss of feature ID when sorting features. It is replicable in QGIS too. I'm surprised the geopackage worked at all considering the empty attribute name used for the indexed ID.

@nirvn
Copy link
Member

nirvn commented Oct 27, 2023

@abdullamuthana , exactly 💯

@abdullamuthana
Copy link
Author

Ok let me try to do name for it

@abdullamuthana
Copy link
Author

Why i can't do a name for it inside DB Manager of Qgis ?
image

@nirvn
Copy link
Member

nirvn commented Oct 27, 2023

@abdullamuthana , empty column names have got to break quite a few assumptions in QGIS.

I was able to rename the column using SQLite Browser.

@abdullamuthana
Copy link
Author

I have downloaded DB Browser SQLite would you please guide me ?
image

@abdullamuthana
Copy link
Author

nvr mind i have figure out
image

@abdullamuthana
Copy link
Author

The Issue has been fixed after creating a name for it
Many Thanks

@nirvn
Copy link
Member

nirvn commented Oct 27, 2023

@abdullamuthana , great, thanks for confirming. Happy field mapping!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants