Bug report #21328

Filtered WFS-Layer saves changes to other Features

Added by Stefan Overkamp almost 6 years ago. Updated over 5 years ago.

Status:Feedback
Priority:Normal
Assignee:Jürgen Fischer
Category:Web Services clients/WFS
Affected QGIS version:3.7(master) Regression?:No
Operating System:Windows 10 Easy fix?:No
Pull Request or Patch supplied:No Resolution:duplicate
Crashes QGIS or corrupts data:No Copied to github as #:29146

Description

I have a PostGIS-Table served by Geoserver 2.14 as WFS-T an loaded into QGIS as a Layer.

I'm filtering the WFS-Layer on the current maps extent e.g.:
intersects($geometry, geom_from_wkt('POLYGON)'))

If I edit a feature (e.g. with ID 111071). QGIS 3.4.4 creates a incorrect filter
filter = [ radroutenspeicher_admin.112505 ] //Geoserver LOG output
instead of filter = [ radroutenspeicher_admin.111071]

This changes (updates, deletes) other features instead of the edited one.

Request: transaction
    service = WFS
    version = 1.0.0
    baseUrl = https://server.de:443/geoserver/
    group[0] = wfs:update=net.opengis.wfs.impl.UpdateElementTypeImpl@250a8e07 (filter: [ radroutenspeicher_admin.112505 ], handle: null, inputFormat: <unset>, srsName: null, typeName: {radroutenspeicher}radroutenspeicher_admin)
    update[0]:
        property[0]:
            name = {radroutenspeicher}mobikenn
            value = {}property[0]:
            name = {radroutenspeicher}streckennetz
            value = {}property[0]:
            name = {radroutenspeicher}routenzugehoerigkeit
            value = {}property[0]:
            name = {radroutenspeicher}kommentar
            value = test
        filter = [ radroutenspeicher_admin.112505 ]
        inputFormat = x-application/gml:3
        typeName = {radroutenspeicher}radroutenspeicher_admin
    releaseAction = ALL
2019-02-20 16:45:45,982 INFO [org.geoserver.flow] - releasing flow controllers for [WFS 1.0.0 Transaction]

Related issues

Duplicates QGIS Application - Bug report #20742: Zoom to Layer does not respond to filtered WFS Closed 2018-12-06

History

#1 Updated by Alessandro Pasotti almost 6 years ago

#2 Updated by Giovanni Manghi almost 6 years ago

  • Status changed from Open to Closed
  • Resolution set to duplicate

#3 Updated by Stefan Overkamp almost 6 years ago

  • Status changed from Closed to Reopened

No duplicate.

#4 Updated by Giovanni Manghi almost 6 years ago

Stefan Overkamp wrote:

No duplicate.

can you elaborate please?

#5 Updated by Stefan Overkamp almost 6 years ago

  • Assignee set to Even Rouault

QGIS 3.4.4 changes (updates, deletes) other features instead of the edited one.
This was observed on a filtered WFS-Layer.
QGIS sends a incorrect Feature-ID to the wfs transaction.
This has nothing to do with unability to zoom (#20742).

#6 Updated by Alessandro Pasotti almost 6 years ago

  • Assignee deleted (Even Rouault)
  • Status changed from Reopened to Closed

First: you do not assign bugs to developers, we choose what we want/can work on.

Second: you should trust better our opinion if a bug is a duplicate or not, the root cause of your issue is most likely the same of the zoom issue (which was a wrong feature id assigned by the provider) and that issue has been fixed in master last week.

So, please test the latest master builds and if the issue is not solved, feel free to re-open.

#7 Updated by Stefan Overkamp almost 6 years ago

  • Status changed from Closed to Reopened

Tested wit QGIS 3.6.0 the problem still occurs.

I have a PostGIS-Table served by Geoserver 2.14 as WFS-T an loaded into QGIS as a Layer.
I'm filtering the WFS-Layer on the current maps extent e.g.: intersects($geometry, geom_from_wkt('POLYGON)'))

If I edit a feature (e.g. with ID 48110). QGIS 3.6.0 creates a incorrect filter
filter = [ radroutenspeicher_admin.945] //Geoserver LOG output
instead of filter = [ radroutenspeicher_admin.48110]

This changes (updates, deletes) other features instead of the edited one.

#8 Updated by Jürgen Fischer almost 6 years ago

  • Description updated (diff)

#9 Updated by Alessandro Pasotti almost 6 years ago

  • Affected QGIS version changed from 3.4.4 to 3.6.0

#10 Updated by Jürgen Fischer almost 6 years ago

  • Assignee set to Jürgen Fischer

#11 Updated by Stefan Overkamp over 5 years ago

Filtering a WFS-Layer multiple times with different map extents (e.g. intersects($geometry, geom_from_wkt('POLYGON((...
  • leads to a new feature cache with every filtering
  • fills the ID-CACHE with multiple same dbIds (e.g. 1) for different features, e.g. sorted by dbid:
ROWID   gmlid           dbid  qgisid
1       wfs_test.1       1      1  
6389    wfs_test.6572    1      6389
9359    wfs_test.9602    1      9359

Deleting feature wfs_test.6572 in QGIS sends a delete transaction with filter = [ wfs_test.1 ].
So deletes Feature 1 instead of Feature 6572.

I think there is a problem with not unique dbIds in the ID-Cache or the selection of gmlIds from dbIds.

#12 Updated by Giovanni Manghi over 5 years ago

  • Status changed from Reopened to Feedback

Stefan Overkamp wrote:

Tested wit QGIS 3.6.0 the problem still occurs.

not sure the fix Alessandro is referring to made into 3.6, so you should really test QGIS master, thanks.

#13 Updated by Stefan Overkamp over 5 years ago

Tested with qgis-rel-dev 3.6.0-9 code version 43c5a1f295.
Same behaviour.

#14 Updated by Giovanni Manghi over 5 years ago

Stefan Overkamp wrote:

Tested with qgis-rel-dev 3.6.0-9 code version 43c5a1f295.
Same behaviour.

is not master, try install qgis-dev using the osgeo4w installer.

#15 Updated by Stefan Overkamp over 5 years ago

Tested with qgis-dev 3.7.0-master
code version: 34a0650177

Same behaviour.

#16 Updated by Giovanni Manghi over 5 years ago

  • Affected QGIS version changed from 3.6.0 to 3.7(master)

Stefan Overkamp wrote:

Tested with qgis-dev 3.7.0-master
code version: 34a0650177

Same behaviour.

can you provide an endpoint for tests?

#17 Updated by Jürgen Fischer over 5 years ago

Giovanni Manghi wrote:

can you provide an endpoint for tests?

I have one now. Maybe I get a chance to look at the issue in A Coruna.

#18 Updated by Giovanni Manghi over 5 years ago

Jürgen Fischer wrote:

Giovanni Manghi wrote:

can you provide an endpoint for tests?

I have one now. Maybe I get a chance to look at the issue in A Coruna.

ok cool

Also available in: Atom PDF