Bug report #15482

Qgis Desktop cannot open layers from Qgis Server if the short_name option has been setup

Added by Tudor Bărăscu about 8 years ago. Updated over 7 years ago.

Status:Closed
Priority:Severe/Regression
Assignee:René-Luc ReLuc
Category:QGIS Server
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

Description

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

History

#1 Updated by Tudor Bărăscu about 8 years ago

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.

#2 Updated by Giovanni Manghi almost 8 years ago

  • Operating System deleted (Debian)
  • OS version deleted (Stretch)
  • 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.

#3 Updated by Giovanni Manghi almost 8 years ago

  • Status changed from Feedback to Open

#4 Updated by Giovanni Manghi over 7 years ago

  • Status changed from Open to Feedback

I just found a workaround: delete the .qgis2/cache directory.
However, we shouldn't be in this case.

Hi Tudor and René-Luc, what is the status of this issue in the latest point releases of qgis server 2.14 and 2.18?

#5 Updated by Tudor Bărăscu over 7 years ago

  • Status changed from Feedback to Closed

@Giovanni The issue is not reproducible anymore. I tested under 2.14 and 2.18 and everything is working as it should.

#6 Updated by Giovanni Manghi over 7 years ago

  • Resolution set to fixed/implemented

Tudor Bărăscu wrote:

@Giovanni The issue is not reproducible anymore. I tested under 2.14 and 2.18 and everything is working as it should.

nice!

Also available in: Atom PDF