Bug report #15647

WFS client does not update layer list

Added by Ari Jolma about 3 years ago. Updated about 3 years ago.

Status:Closed
Priority:Normal
Assignee:Even Rouault
Category:Web Services clients/WFS
Affected QGIS version:2.16.2 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:23570

Description

With 2.16.2 when one connects to a WFS provider the layer list is not updated after the first time Connect is pressed in the dialog (the response is cached locally). This means that when a new layer is published or a layer is unpublished at the server those changes are not shown in the client.

The update can be forced by removing the client cache (rm -rf .qgis2/cache/data7). But this is again one time only.

The problem can be fixed by changing 'false' to 'true' in the sendGet call in QgsWFSCapabilities::requestCapabilities (that is the bool forceRefresh parameter).

Associated revisions

Revision b8ff71af
Added by Even Rouault about 3 years ago

[WFS provider] Force refresh of GetCapabilities when pressing Connect

The cached response to GetCapabilities was always used, even when
pressing Connect. Now a new request is sent over the network.

Fixes #15647

Revision 302570e5
Added by Even Rouault about 3 years ago

[WFS provider] Force refresh of GetCapabilities when pressing Connect

The cached response to GetCapabilities was always used, even when
pressing Connect. Now a new request is sent over the network.

Fixes #15647

Revision 85e9389c
Added by Even Rouault about 3 years ago

[WFS provider] Force refresh of GetCapabilities when pressing Connect

The cached response to GetCapabilities was always used, even when
pressing Connect. Now a new request is sent over the network.

Fixes #15647

History

#1 Updated by Eduardo Gonzalez about 3 years ago

I did some testing about this problem and no cache seems to be present for me. I have my own test geoserver where to which I connect using the wfs-dialog, then I remove some layers, connect again and the list is being downloaded from geoserver, because the layers removed there are not anymore in the list.
I can see the .qgis2/cache/data7 folder, but as mentioned above no cache seems to be used in my case.

I am using a virtualbox Ubuntu 14.04 machine with QGIS 2.16.3 installed

#2 Updated by Ari Jolma about 3 years ago

I checked this with Eduardo and his QGIS does not seem to store http request responses to cache. Why, we don't know but that's the reason the WFS client works for him.

#3 Updated by Eduardo Gonzalez about 3 years ago

I managed to replicate Ari's problem. I had to update QGIS's settings for network caching. It seems the default is 0 kb and then no cache is saved, therefore I did not have Ari's problem. Now I extended the cache size and the wfs layer list is not updated using the Connect button.

#4 Updated by Even Rouault about 3 years ago

  • Status changed from Open to Closed

#5 Updated by Even Rouault about 3 years ago

  • Target version set to Version 2.16

Also available in: Atom PDF