Bug report #17507
Unable to edit filtered GeoPackage layer
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | Alessandro Pasotti | ||
Category: | Data Provider | ||
Affected QGIS version: | 2.18.14 | Regression?: | Yes |
Operating System: | Ubuntu Linux | Easy fix?: | No |
Pull Request or Patch supplied: | Yes | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 25404 |
Description
- open existing geopackage layer
- swich layer in edit mode
- add new features
- commit changes
- exit from edit mode
- apply filter
- swich layer in edit mode
- add new features
- commit changes - ERROR "Could not commit changes to layer"
- cancel changes, save project and exit QGIS without filter removal
- reopen in previous CASE saved QGIS project
- geopackage layer is readonly, impossible to swich in edit mode
- remove applied filter
- layer continues to be read only
- save project and exit QGIS
- reopen project and layers is editable
- is there any reason why filtered geopackage layers is not editable?
- attached qgis project file with geopackage layer (applied filter) used in CASE description.
Related issues
Associated revisions
[app][bugfix] Update layer editable state when filter is changed
Fixes #17507
[bugfix] Update layer editable state when filter is changed
Fixes #17507 Unable to edit filtered GeoPackage layer
Backported from master https://github.com/qgis/QGIS/pull/5691
History
#1 Updated by Giovanni Manghi almost 7 years ago
master is also affected. I'm tagging this as a regression, at least the part that removing the filter does not make the layer editable is certainly a regression.
#2 Updated by Giovanni Manghi almost 7 years ago
- Priority changed from Normal to High
- Regression? changed from No to Yes
#3 Updated by Alessandro Pasotti almost 7 years ago
- Assignee set to Alessandro Pasotti
#4 Updated by Alessandro Pasotti almost 7 years ago
- Crashes QGIS or corrupts data changed from No to Yes
It actually crashes QGIS master/latest when removing the filter ...
#5 Updated by Alessandro Pasotti almost 7 years ago
I filed another ticket for the crash (probably unrelated) #17511
#6 Updated by Alessandro Pasotti almost 7 years ago
- Related to Bug report #17511: adding two instances of the same gpkg layer and editing on one of them crashes qgis added
#7 Updated by Peteris Bruns almost 7 years ago
Alessandro Pasotti wrote:
It actually crashes QGIS master/latest when removing the filter ...
2.18.14 works without crash, just annoying nature and takes time to undestand why the layer is readonly/how to make it writable again.
#8 Updated by Alessandro Pasotti almost 7 years ago
- Crashes QGIS or corrupts data changed from Yes to No
- Pull Request or Patch supplied changed from No to Yes
- Status changed from Open to In Progress
#9 Updated by Anonymous almost 7 years ago
- % Done changed from 0 to 100
- Status changed from In Progress to Closed
Applied in changeset qgis|d775a0d97aa9f51e919f268f13ebf039df7e0350.
#10 Updated by Alessandro Pasotti almost 7 years ago
Backporting will follow ....
#11 Updated by Christian Roettger almost 7 years ago
- File lu_test.prj added
- File lu_test.shp added
- File lu_test.shx added
- File lux_test.qgs added
- File lu_test.dbf added
Directed from the mailing list to this ticket:
I think the bug (or nearly the same) isn't fixed. Attached the shape file and project.
USE CASE:
1. filter shape file
2. save as project
3. reopen => no editing possible
4. remove filter, still no editing possible
5. reopen project => editing possible
Tested on Windows with 2.18.14 and 2.18.15 where it is even worse. In .15 you can't edit a shapefile anymore while a filter is active (CASE 1.). This was possible in .14 :(
#12 Updated by Alessandro Pasotti almost 7 years ago
- Resolution set to fixed/implemented
I had a look to the code and this is actually a different bug from the one I fixed for GPKG (that it's still fixed and working correctly).
Would you be so kind to open a separate ticket and assign it to me? (no need to re-attach the files, just please link to this ticket).
Thanks