Bug report #20865
attributes in attribute table don't match attribute in identify results/labels with WFS layer
Status: | Closed | ||
---|---|---|---|
Priority: | High | ||
Assignee: | - | ||
Category: | Web Services clients/WFS | ||
Affected QGIS version: | 3.5(master) | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | fixed/implemented |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 28684 |
Description
Using the WFS Layer "Netzknoten/Nullpunkte" on the http://inspire.brandenburg.de/services/strassennetz_wfs WFS service, I encounter a very strange problem.
When I graphically select a feature, the attributes shown for the highlighted feature in the attribute table do not match the attributes shown in the indentify results for that features, or the label that's (correctly) displaying one of the attributes. It's as if the attribute table shows completely wrong data for the selected features. Is this a problem with the WFS server or with QGIS?
Associated revisions
[WFS provider] Ensure stability of QGIS FeatureId when reloading layer (fixes #20865)
[WFS provider] Ensure stability of QGIS FeatureId when reloading layer (fixes #20865)
History
#1 Updated by Alessandro Pasotti almost 6 years ago
- Affected QGIS version changed from 3.4.2 to 3.5(master)
Confirmed on master
#2 Updated by Alessandro Pasotti almost 6 years ago
Ok, this is what's happening (and it isn't good news):
- wfs keeps a spatialite cache of features that map QGIS feature ids to gml feature ids
- any time the layer is reloaded the cache is recreated and the QGIS feature id <-> gml id map changes
- when the attribute table is opened in dock mode (and populated), the QGIS application issues a canvas refresh, which in turn triggers a WFS layer reload
So, we end up with a table which was populated with data that came from a cache that has been destroyed
The root of all evil is that there are no stable feature ids from WFS.
#3 Updated by Alessandro Pasotti almost 6 years ago
btw, the issue also arises when the table is not docked and the table reload button is pushed.
#4 Updated by Giovanni Manghi almost 6 years ago
- Status changed from Open to Feedback
Does it works as expected on 2.18?
#5 Updated by Even Rouault almost 6 years ago
- Status changed from Feedback to Open
- Priority changed from Normal to High
- Category changed from Attribute table to Web Services clients/WFS
#6 Updated by Even Rouault almost 6 years ago
#7 Updated by Even Rouault almost 6 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100
Applied in changeset qgis|e19bf11f9edc2c40a926fa66aeff200d5fa2eb3e.
#8 Updated by Even Rouault almost 6 years ago
- Resolution set to fixed/implemented
Backported to 3.4 per https://github.com/qgis/QGIS/pull/9113