qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.52k stars 2.99k forks source link

WFS-T client on master cannot commit changes #16755

Closed qgib closed 5 years ago

qgib commented 11 years ago

Author Name: Giovanni Manghi (@gioman) Original Redmine Issue: 7881 Affected QGIS version: master Redmine category:qgis_server


The "add features" button is always disabled in when editing a WFS-T layer on master. It works on QGIS 1.8.

Tested with both QGIS Server and TinyOWS server.

qgib commented 11 years ago

Author Name: Giovanni Manghi (@gioman)


The "add feature" button is now active, but any try to commit an edit (on a wfs layer that in the server is a postgis layer) results in

Errors: ERROR: 1 feature(s) not added.


qgib commented 11 years ago

Author Name: Salvatore Larosa (@slarosa)


Confirmed here with the same error!

qgib commented 11 years ago

Author Name: Salvatore Larosa (@slarosa)


just tried on Lisboa and I got the same error !

my testcase is with http://lrssvt.ns0.it/cgi-bin/wfs_catasto/qgis_mapserv.fcgi?SERVICE=WFS&REQUEST=GetCapabilities that may be used for your tests too.

delete and update operations work properly both master and 1.8.

qgib commented 11 years ago

Author Name: Giovanni Manghi (@gioman)


Salvatore Larosa wrote:

just tried on Lisboa and I got the same error !

my testcase is with http://lrssvt.ns0.it/cgi-bin/wfs_catasto/qgis_mapserv.fcgi?SERVICE=WFS&REQUEST=GetCapabilities that may be used for your tests too.

delete and update operations work properly both master and 1.8.

with

http://mapserver.uevora.pt/cgi-bin/qgis_mapserv.fcgi?map=/home/mapserver/wfs/test_wfs.qgs

it it fails also with update and delete (the layer is a polygon one, "evora_pg_wfst", and it has the right permissions).

qgib commented 11 years ago

Author Name: Giovanni Manghi (@gioman)


delete and update operations work properly both master and 1.8.

I tested also 1.8, and now oddly it fails (all kind of edit operations) also in 1.8 (I'm sure that when I originally filed the ticket it worked).

qgib commented 11 years ago

Author Name: Giovanni Manghi (@gioman)


update and delete now works, adding still does not.

qgib commented 11 years ago

Author Name: Salvatore Larosa (@slarosa)


using shp file has worked here:

http://lrssvt.ns0.it/cgi-bin/qgis_mapserv.fcgi?map=/home/sam/Scaricati/linien/test2_wfs.qgs&SERVICE=WFS&REQUEST=GetCapabilities

maybe a problem with postgres provider ?

qgib commented 11 years ago

Author Name: Salvatore Larosa (@slarosa)


I am not sure if this may be considered a WFS Client issue. I think it is a QGIS Server issue. WFS-T created with QGIS Server and PostGIS layers doesn't enable you to add new features while if WFS-T has been created with SHP layer everything works fine!

Do you think these are two different issues ?

qgib commented 11 years ago

Author Name: Giovanni Manghi (@gioman)


qgib commented 11 years ago

Author Name: Salvatore Larosa (@slarosa)


The point is:

------------------------------------------
Data Provider | Update | Insert | Delete
------------------------------------------
Spatialite    |  Yes   |  Yes   |  Yes
------------------------------------------
Shapefile     |  Yes   |  Yes   |  Yes
------------------------------------------
PostGIS       |  Yes   |  No    |  Yes
------------------------------------------
qgib commented 11 years ago

Author Name: Giovanni Manghi (@gioman)


Salvatore Larosa wrote:

The point is:

[...]

I don't think that SL is supported at all by wfs-t, but not sure 100%

qgib commented 11 years ago

Author Name: Jürgen Fischer (@jef-n)


Salvatore Larosa wrote:

The point is:

[...]

does the user running the mapserver have r/w access to the sqlite database and the directory it's in?

qgib commented 11 years ago

Author Name: Salvatore Larosa (@slarosa)


Jürgen Fischer wrote:

does the user running the mapserver have r/w access to the sqlite database and the directory it's in?

Yes, the www-data user has rw access to the DB.

qgib commented 11 years ago

Author Name: Jürgen Fischer (@jef-n)


Salvatore Larosa wrote:

Jürgen Fischer wrote:

does the user running the mapserver have r/w access to the sqlite database and the directory it's in?

Yes, the www-data user has rw access to the DB.

And the directory?

qgib commented 11 years ago

Author Name: Salvatore Larosa (@slarosa)


Jürgen Fischer wrote:

Salvatore Larosa wrote:

Jürgen Fischer wrote:

does the user running the mapserver have r/w access to the sqlite database and the directory it's in?

Yes, the www-data user has rw access to the DB.

And the directory?

Sorry Jürgen for this, I updated the comment 10 with three Yes for Spatialite provider. Directory was without write access for www-data.

qgib commented 11 years ago

Author Name: Jürgen Fischer (@jef-n)


Did you try to add/update multilines/multipoints in postgis? That should be solved with 95874fe8b3


qgib commented 11 years ago

Author Name: Salvatore Larosa (@slarosa)


I just tried to add a multiline but it has not worked for me.

qgib commented 11 years ago

Author Name: Jürgen Fischer (@jef-n)


Salvatore Larosa wrote:

I just tried to add a multiline but it has not worked for me.

Try with 6d48f11e5 please.

qgib commented 11 years ago

Author Name: Salvatore Larosa (@slarosa)


Works, even with my testcase in comment 3. I think this may be closed.

Thanks a lot!

qgib commented 11 years ago

Author Name: Giovanni Manghi (@gioman)


Salvatore Larosa wrote:

Works, even with my testcase in comment 3. I think this may be closed.

Thanks a lot!

I cannot compile until tomorrow, but hey, if it works... it works! :) Thanks Jurgen and Salvatore!