mobile
mobile copied to clipboard
Input still uses removed column
When user removes a column in QGIS and synchronize project, in INPUT, the field is still there in the form, can be edited, but then feature is saved, no new feature is created. This issue was intruduced by autosync feature. It works with older version
Scenario:
- create Tree template project and open it in Input and QGIS
- in QGIS, remove notes column from surver layer
- open the form (with already removed field) update it and hit save
- autosync is done.. it passes
- from now, you are not ale to store any new feature
https://user-images.githubusercontent.com/83582181/160777819-97793367-5af4-43d7-900c-8ee4326377cb.mp4
I think this is related to these two issues:
- #1797
- #1798
I can reproduce this one on master version as well.
Console logs:
ERROR 1: Invalid index : 1
ERROR 1: sqlite3_exec(DROP TRIGGER "trigger_insert_feature_count_Survey_points") failed: attempt to write a readonly database
ERROR 1: sqlite3_exec(DROP TRIGGER "trigger_delete_feature_count_Survey_points") failed: attempt to write a readonly database
ERROR 1: sqlite3_exec(UPDATE gpkg_ogr_contents SET feature_count = NULL WHERE lower(table_name )= lower('Survey_points')) failed: attempt to write a readonly database
ERROR 1: failed to execute insert : attempt to write a readonly database
"2022-03-30T08:59:15.852Z QGIS : Warning: Commit errors:\n ERROR: 1 feature(s) not added.\n \n Provider errors:\n OGR error creating feature -10: failed to execute insert : attempt to write a readonly database\n"
"2022-03-30T08:59:15.852Z QGIS Input: Error: Could not save changes. Rolling back.\n"
"2022-03-30T08:59:15.853Z QGIS OGR: Warning: Unbalanced call to leaveUpdateMode() w.r.t. enterUpdateMode()\n"
QFile::remove: Empty or null file name
ERROR 1: Invalid index : 1
In order to reproduce this bug with autosync, one needs to have feature form opened when sync finishes.