Bug report #20801

GetFeatureInfo response empty for child relation table in QGIS Server 3

Added by damien despres almost 6 years ago. Updated almost 6 years ago.

Status:Closed
Priority:Normal
Assignee:Alessandro Pasotti
Category:QGIS Server
Affected QGIS version:3.5(master) Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:worksforme
Crashes QGIS or corrupts data:No Copied to github as #:28621

Description

This was working with QGIS 2 series.

I have a layer with a relation to a table (test_jointure in the logs).
When i do a GetFeatureInfo request to the child layer (test_jointure) using a filter with the id of the object of the parent layer (FILTER : test_jointure:"Id_BDCARTH" = '44089') the response is empty.
The child layer is a table without geometry.

/ows/?exceptions=application%2Fvnd.ogc.se_inimage&feature_count=10&filter=test_jointure%3A%22Id_BDCARTH%22+%3D+%2744089%27&info_format=text%2Fxml&layers=test_jointure&map=%2Fhome%2Fsigeo.qgs&query_layers=test_jointure&request=GetFeatureInfo&service=WMS&styles=&version=1.3.0   3       186
2018-12-13 14:49:08,910 DEBUG [18] REQUEST b'OWS-SERVER-1' b'\x00\x00U[k\xb6$\xf0'
2018-12-13 14:49:08,910 DEBUG [18] SND client: b'OWS-SERVER-1' -> worker: b'!\xeebr\xf7\xd4\x11\xe8\xb93\x02B\xac\x12\x00\x04' : b'\x00\x00U[k\xb6$\xf0'
2018-12-13 14:49:08,910 DEBUG [21] RCV b'OWS-SERVER-1': b'\x00\x00U[k\xb6$\xf0'
2018-12-13 14:49:08,912 INFO [21] Qgis: Server: WMS Request parameters:
2018-12-13 14:49:08,912 INFO [21] Qgis: Server: - LAYERS : test_jointure
2018-12-13 14:49:08,912 INFO [21] Qgis: Server: - QUERY_LAYERS : test_jointure
2018-12-13 14:49:08,912 INFO [21] Qgis: Server: - FEATURE_COUNT : 10
2018-12-13 14:49:08,912 INFO [21] Qgis: Server: - FILTER : test_jointure:"Id_BDCARTH" = '44089'
2018-12-13 14:49:08,912 INFO [21] Qgis: Server: - INFO_FORMAT : text/xml
2018-12-13 14:49:08,913 INFO [21] Qgis: Server: - VERSION : 1.3.0
2018-12-13 14:49:08,913 WARNING [21] Qgis: : Error, could not create output CRS from EPSG
2018-12-13 14:49:08,914 DEBUG [18] SND worker: b'!\xeebr\xf7\xd4\x11\xe8\xb93\x02B\xac\x12\x00\x04' -> client: b'OWS-SERVER-1' : b'\x00\x00U[k\xb6$\xf0'
2018-12-13 14:49:08,914 DEBUG [18] READY b'!\xeebr\xf7\xd4\x11\xe8\xb93\x02B\xac\x12\x00\x04'
2018-12-13 14:49:08,914 RREQ [1] 400 GET ?VERSION=1.3.0&LAYERS=test_jointure&REQUEST=GetFeatureInfo&EXCEPTIONS=application%2Fxml&FEATURE_COUNT=10&FILTER=test_jointure%3A%22Id_BDCARTH%22+%3D+%2744089%27&INFO_FORMAT=text%2Fxml&MAP=%2Fhome%2Fsigeo.qgs&QUERY_LAYERS=test_jointure&STYLES=&SERVICE=WMS 4 186
2018-12-13 14:49:08,915 REQ [1] 172.18.0.2 400 GET /ows/?exceptions=application%2Fxml&feature_count=10&filter=test_jointure%3A%22Id_BDCARTH%22+%3D+%2744089%27&info_format=text%2Fxml&layers=test_jointure&map=%2Fhome%2Fsigeo.qgs&query_layers=test_jointure&request=GetFeatureInfo&service=WMS&styles=&version=1.3.0 5 186

projets.zip (910 KB) damien despres, 2019-01-07 09:30 AM

History

#1 Updated by Alessandro Pasotti almost 6 years ago

  • Status changed from Open to Feedback

Can you please attach a test project (both server and client) with data, so that we can test and try to reproduce the issue?

#2 Updated by damien despres almost 6 years ago

yes here it is.
Please note that this is a test project used to reproduce this issue.
Only a few items have effective relations => On the north west of the map. But the request i posted in first message( with filter test_jointure:"Id_BDCARTH" = '44089') is supposed to return some child objects:

ows/?exceptions=application%2Fvnd.ogc.se_inimage&feature_count=10&filter=test_jointure%3A%22Id_BDCARTH%22+%3D+%2744089%27&info_format=text%2Fxml&layers=test_jointure&map=%2Fhome%2Fsigeo.qgs&query_layers=test_jointure&request=GetFeatureInfo&service=WMS&styles=&version=1.3.0

#3 Updated by Giovanni Manghi almost 6 years ago

  • Status changed from Feedback to Open

#4 Updated by Alessandro Pasotti almost 6 years ago

  • Assignee set to Alessandro Pasotti

#5 Updated by Alessandro Pasotti almost 6 years ago

  • Affected QGIS version changed from 3.2 to 3.5(master)
  • Resolution set to worksforme
  • Status changed from Open to Feedback

Hi, I set up your test project and it works for me on current master:

GetFeatureInfoResponse>
 <BoundingBox minx="0" maxx="0" miny="0" maxy="0" CRS="EPSG:4326"/>
 <Layer name="test_jointure">
  <Feature id="48">
   <Attribute value="44.089" name="Id_BDCARTH"/>
   <Attribute value="Eau douce permanente" name="Nature"/>
   <Attribute value="Plan d'eau, bassin, r�servoir" name="Type"/>
   <Attribute value="" name="Toponyme"/>
   <Attribute value="R1235023" name="Code_Entit"/>
   <Attribute value="" name="Sous_Milie"/>
   <Attribute value="7" name="Classifica"/>
   <Attribute value="" name="Toponyme_E"/>
   <Attribute value="" name="Candidat_E"/>
   <Attribute value="R1231030" name="Code_Hydro"/>
  </Feature>
  <Feature id="49">
   <Attribute value="44.089" name="Id_BDCARTH"/>
   <Attribute value="Eau douce permanente" name="Nature"/>
   <Attribute value="Plan d'eau, bassin, r�servoir" name="Type"/>
   <Attribute value="" name="Toponyme"/>
   <Attribute value="L0705023" name="Code_Entit"/>
   <Attribute value="3" name="Sous_Milie"/>
   <Attribute value="7" name="Classifica"/>
   <Attribute value="" name="Toponyme_E"/>
   <Attribute value="" name="Candidat_E"/>
   <Attribute value="" name="Code_Hydro"/>
  </Feature>
  <Feature id="50">
[...]

But, your request was not correct (missing mandatory parameter CRS, the request that worked for me was (note initial SRS):

SRS=EPSG:4326&map=/Maps/bug_20801/projets/sigeo.qgs&exceptions=application/xml&feature_count=10&filter=test_jointure:"Id_BDCARTH" = '44089'&info_format=text/xml&layers=test_jointure&query_layers=test_jointure&request=GetFeatureInfo&service=WMS&styles=&version=1.3.0

Btw, what I get with you request (without SRS) is an exception and not an empty response:

<ServiceExceptionReport version="1.3.0" xmlns="http://www.opengis.net/ogc">
 <ServiceException code="InvalidCRS">Could not create output CRS</ServiceException>
</ServiceExceptionReport>

#6 Updated by Alessandro Pasotti almost 6 years ago

  • Status changed from Feedback to Closed

#7 Updated by damien despres almost 6 years ago

thanks a lot for your feedback. it's great if it is now working in current release

#8 Updated by Alessandro Pasotti almost 6 years ago

Hi Damien, in fact I was waiting for yours feedback, please test the latest releases and re-open this issue if you can still reproduce it.

#9 Updated by damien despres almost 6 years ago

ok, i opened this issue for a customer and unfortunately the mission is over and i have no more access to the infrastructure but i will try to reproduce on my spare time if possible

Also available in: Atom PDF