Bug report #17400

GetFeatureInfo "Layer not found" error

Added by Éric Lemoine almost 7 years ago. Updated almost 7 years ago.

Status:Closed
Priority:High
Assignee:Paul Blottiere
Category:QGIS Server
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:25297

Description

QGIS Server returns "Layer not found" errors on GetFeatureInfo queries with out-of-scale layers.

This is the query:

http://197.157.195.138/qgis/cid?service=WMS&version=1.1.1&request=GetFeatureInfo&srs=EPSG:3857&info_format=text%2Fxml&x=51&y=51&exceptions=application%2Fjson&id=1509025731902&layers=Communes&query_layers=Communes&height=101&width=101&bbox=3282411.2320540333,-398477.5109080996,3310804.3310123663,-370084.4119497662&feature_count=10&FI_POINT_TOLERANCE=16&FI_LINE_TOLERANCE=8&FI_POLYGON_TOLERANCE=4

It has

query_layers=Communes
.

The corresponding GetMap query works as expected:

http://197.157.195.138/qgis/cid?service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&exceptions=application%2Fjson&id=1509025731902&layers=Communes&height=101&width=101&bbox=3282411.2320540333,-398477.5109080996,3310804.3310123663,-370084.4119497662

I've figured that the issue is related to the visibility of the layer. If the layer is scale-dependant and not visible at the current scale then QGIS Server returns a "Layer not found" error.

That behaviour is not correct. An empty response should be received instead of an error. It is a major bug!

Associated revisions

Revision 39bce943
Added by Paul Blottiere almost 7 years ago

Fixes #17400 by returning an empty response if a layer is ignored due to configuration

Revision ecacb3b0
Added by Paul Blottiere almost 7 years ago

Merge pull request #5519 from pblottiere/server_bugfix_layernotfoud

[server][bugfix] Fixes #17400 by returning an empty response instead of an exception

History

#1 Updated by Paul Blottiere almost 7 years ago

  • Assignee set to Paul Blottiere

#2 Updated by Paul Blottiere almost 7 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

Also available in: Atom PDF