Bug report #8795

Potential WFS filtering issue

Added by Jeffrey Bostoen about 11 years ago. Updated almost 11 years ago.

Status:Closed
Priority:Normal
Assignee:René-Luc ReLuc
Category:QGIS Server
Affected QGIS version:master 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 #:17496

Description

I've taken this as an example: http://demo.3liz.com/wfst/wfs-filter.html

I'm using QGis Server 2, also tried upgrading to the master branch.
For some reason, using this code below (adapted from the example above), I get a "RequestNotWellFormed"-issue without any further details (would be nice to have those, if I'm doing something wrong?)
It works if I remove the filter-part. "ADRES" is a valid field.

In QGis Desktop, this layer source works. Only noticeable differences are no BBox here and different wildcard (%, *) and 'escapeChar' instead of 'escape'.

http://10.210.0.87/cgi-bin/crab/qgis_mapserv.fcgi?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=crab2&SRSNAME=EPSG:4326&FILTER=<ogc:Filter>
 <ogc:PropertyIsLike wildCard="%" singleChar="?" escapeChar="!">
  <ogc:PropertyName>ADRES</ogc:PropertyName>
  <ogc:Literal>Korenmarkt%</ogc:Literal>
 </ogc:PropertyIsLike>
</ogc:Filter>
wfs84 = new OpenLayers.Layer.Vector("WFS", {
    strategies: [new OpenLayers.Strategy.BBOX()],
            protocol: new OpenLayers.Protocol.WFS({
                version: '1.0.0',
                url: "http://10.210.0.87/cgi-bin/crab/qgis_mapserv.fcgi",
                featureType: "crab2",
                featureNS: "http://www.qgis.org/gml",
                geometryName: "geometry" 

            }),

            styleMap: new OpenLayers.StyleMap({
                fill: true,
                fillColor: "#333333",
                fillOpacity: 0.7,
                stroke: true,
                strokeWidth: 3,
                strokeColor: "#333333",
                graphic: true,
                graphicName: "circle",
                pointRadius: 6
            }),

           filter: new OpenLayers.Filter.Logical({
                type: OpenLayers.Filter.Logical.OR,
                filters: [
                    new OpenLayers.Filter.Comparison({
                        type: OpenLayers.Filter.Comparison.LIKE,
                        property: "ADRES",
                        value: 'M*'
                    }),

                    new OpenLayers.Filter.Comparison({
                        type: OpenLayers.Filter.Comparison.LIKE,
                        property: "ADRES",
                        value: 'L*'
                    })

                ]

            })

        })

History

#1 Updated by Paolo Cavallini almost 11 years ago

  • Target version changed from Version 2.0.0 to Future Release - High Priority

#2 Updated by René-Luc ReLuc almost 11 years ago

  • Assignee set to René-Luc ReLuc

Have you tested again ?
If yes and that the bug persists, can you give me accessibility to examples ?

#3 Updated by René-Luc ReLuc almost 11 years ago

  • Affected QGIS version changed from 2.0.1 to master
  • Resolution set to fixed/implemented
  • Target version changed from Future Release - High Priority to Version 2.2
  • Status changed from Open to Closed

Also available in: Atom PDF