Qgis: Cannot commit edits to spatialite layers in QGIS 3.12

Created on 26 Feb 2020  路  4Comments  路  Source: qgis/QGIS

Describe the bug
When I try to commit edits to a spatialite layer I get a yellow warning saying the following:
Could not commit changes to layer Facilities
Errors: ERROR: 5 feature(s) not added.
Provider errors:
SQLite error: unknown cause
SQL: INSERT INTO "facilities"("geometry",,"type","comment") VALUES (GeomFromWKB(?, 2157),,?,?)

and a red warning saying the following:
Layer Facilities: SQLite error: unknown cause SQL: INSERT INTO "facilities"("geometry",,"type","comment") VALUES (GeomFromWKB(?, 2157),,?,?)

This prevents me from making any edits to spatialite layers.

How to Reproduce

  1. Create a new spatialite database and layer
  2. Enable editing, add features, click save edits
  3. See error(s)

QGIS and OS versions

QGIS version
3.12.0-Bucure葯ti
QGIS code revision
cd141490ec
Compiled against Qt
5.11.2
Running against Qt
5.11.2
Compiled against GDAL/OGR
3.0.4
Running against GDAL/OGR
3.0.4
Compiled against GEOS
3.8.0-CAPI-1.13.1
Running against GEOS
3.8.0-CAPI-1.13.1
Compiled against SQLite
3.29.0
Running against SQLite
3.29.0
PostgreSQL Client Version
11.5
SpatiaLite Version
4.3.0
QWT Version
6.1.3
QScintilla2 Version
2.10.8
Compiled against PROJ
6.3.1
Running against PROJ
Rel. 6.3.1, February 10th, 2020
OS Version
Windows 10 (10.0)

Test Project and Database
test_project_and_db.zip

Bug Data Provider High Priority Regression

All 4 comments

Can you please share a project with a test DB?

@elpaso - Yes, please see edited question.

Confirmed also here. Also on 3.10.3.

I can reproduce manually, but the wierd thing is that there are tests for that and they are all passing :/

Was this page helpful?
0 / 5 - 0 ratings