Bug report #19826

GetFeatureInfo with FILTER doesn't work for gpkg - Test added

Added by Tudor Bărăscu about 4 years ago. Updated about 4 years ago.

Assignee:Paul Blottiere
Category:QGIS Server
Affected QGIS version:3.3(master) Regression?:No
Operating System:Debian Stretch and Travis :) Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:27650


Test already in:



   # TODO make filter work with gpkg and move test inside testGetFeatureInfoFilter function
    def testGetFeatureInfoFilterGPKG(self):
        # 'test_project.qgz' ='test_project.qgs' but with a gpkg source + different fid
        # Regression for #8656 Test getfeatureinfo response xml with gpkg datasource
        # Mind the gap! (the space in the FILTER expression)
                                 '&layers=testlayer%20%C3%A8%C3%A9&' +
                                 'INFO_FORMAT=text%2Fxml&' +
                                 'width=600&height=400&srs=EPSG%3A3857&' +
                                 'query_layers=testlayer%20%C3%A8%C3%A9&' +
                                 'FEATURE_COUNT=10&FILTER=testlayer%20%C3%A8%C3%A9' + urllib.parse.quote(':"NAME" = \'two\''),

Basically the server outpus:

 <Layer name="testlayer èé">
  <Feature id="2">
   <Attribute value="2" name="id"/>
   <Attribute value="two" name="name"/>
   <Attribute value="two àò" name="utf8nameè"/>

instead of

 <Layer name="testlayer èé">
  <Feature id="2">
   <Attribute value="0" name="id"/>
   <Attribute value="2" name="name"/>
   <Attribute value="two" name="utf8nameè"/>

It seems the output values index are shifted with +1.

Associated revisions

Revision 5a9067e7
Added by Paul Blottiere about 4 years ago

Fixes #19826 - Use subset layer to manage fid


#1 Updated by Paul Blottiere about 4 years ago

  • Assignee set to Paul Blottiere

#2 Updated by Paul Blottiere about 4 years ago

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

Also available in: Atom PDF