Bug report #15482
Qgis Desktop cannot open layers from Qgis Server if the short_name option has been setup
|Affected QGIS version:||2.14.5||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 #:||23406|
How to replicate:
- use the short_name option for a layer
- serve that layer trough QGIS Server
- when trying to add it with Qgis Desktop it throws an error:
Invalid Layer: WMS provider Cannot calculate extent (file: src/providers/wms/qgswmsprovider.cpp row: 137function QgsWmsProvider:) Raster layer Provider is not valid (provider: wms, URI: contextualWMSLegend=0&crs=EPSG:3844&dpiMode=7&featureCount=10&format=image/jpeg&layers=adr&styles=&url=http://qgisplatform.demo/cgi-bin/qgis_mapserv.fcgi?map%3D/home/web/Downloads/proiect_qgis/harta.qgs%26VERSION%3D1.3.0%26 (file: src/core/raster/qgsrasterlayer.cpp row: 668function setDataProvider:)
If I do a getmap request in a browser it works well.
Tested under 2.16 and 2.14
#2 Updated by Giovanni Manghi almost 5 years ago
- Operating System deleted (
- OS version deleted (
- Priority changed from High to Severe/Regression
- Status changed from Open to Feedback
- Category set to QGIS Server
Tudor Bărăscu wrote:
It seems that even if I rename to whatever any layer in any qgs project I cannot add that layer in QGIS Desktop (same error message).
I just found a workaround: delete the .qgis2/cache directory.
However, we shouldn't be in this case.
this has been reported several times lately (we should try merge all these reports): even with the cache set to 0 in general options the wms client fails to load layers from qgis server services that have been changed. Forcing to clean cache (from GUI or manually as you did) solves the issue, but as you said this should not happen and was not a issue in the past.
Seen also on other platforms.