Skip to content

Cross layer filter: some wfs requests fails #3934

@MV88

Description

@MV88

Description

i was trying this map in our dev env

with this filter (notice that the same filter with the operator >= works)
image

without getting a valid result in the feature grid
The wfs request fails and in the feature grid i have all the results
The wms requests worked since the synch button filtered out some features

here is the failing request

curl 'https://demo.geo-solutions.it/geoserver/wfs?service=WFS&outputFormat=json' -H 'Accept: application/json' -H 'Referer: https://dev.mapstore2.geo-solutions.it/mapstore/' -H 'Origin: https://dev.mapstore2.geo-solutions.it' -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36' -H 'Content-Type: application/json' --data-binary $'<wfs:GetFeature startIndex="0" maxFeatures="20" service="WFS" version="1.1.0" xmlns:gml="http://www.opengis.net/gml" xmlns:wfs="http://www.opengis.net/wfs" xmlns:ogc="http://www.opengis.net/ogc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd"><wfs:Query typeName="topp:states" srsName="EPSG:4326"><ogc:Filter><ogc:Intersects><ogc:PropertyName>the_geom</ogc:PropertyName><ogc:Function name="collectGeometries"><ogc:Function name="queryCollection"><ogc:Literal>topp:states</ogc:Literal><ogc:Literal>the_geom</ogc:Literal><ogc:Literal>("LAND_KM" <= \'1000000\')</ogc:Literal></ogc:Function></ogc:Function></ogc:Intersects></ogc:Filter><ogc:SortBy><ogc:SortProperty><ogc:PropertyName>STATE_NAME</ogc:PropertyName><ogc:SortOrder>A</ogc:SortOrder></ogc:SortProperty></ogc:SortBy></wfs:Query></wfs:GetFeature>' --compressed

with this error

<?xml version="1.0" encoding="UTF-8"?><ows:ExceptionReport xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ows="http://www.opengis.net/ows" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.0.0" xsi:schemaLocation="http://www.opengis.net/ows https://demo.geo-solutions.it:443/geoserver/schemas/ows/1.0.0/owsExceptionReport.xsd">
  <ows:Exception exceptionCode="NoApplicableCode">
    <ows:ExceptionText>org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 644; The content of elements must consist of well-formed character data or markup.
The content of elements must consist of well-formed character data or markup.</ows:ExceptionText>
  </ows:Exception>
</ows:ExceptionReport>

then i re enter advanced search, i click on search again, i have an empty feature grid.
so the first time the error appears it does not update the feature grid

Depends On (optional)

Please indicate if this issue is related to a bug or a new feature request

  • Bug
  • New Feature

In case of Bug (otherwise remove this paragraph)

Browser Affected
(use this site: https://www.whatsmybrowser.org/ for non expert users)

  • Internet Explorer
  • Chrome
  • Firefox
  • Safari

Browser Version Affected

  • Indicate the browser version in which the issue has been found

Steps to reproduce

  • open the map indicated in description
  • open feature grid and then advanced search
  • use the filter described above and click search
  • check expect result Added clone instructions to readme #1
    then
  • return to advanced search
  • click on search again
  • check expect result Fixed dist dir #2

Expected Result

  1. the feature grid contains the records that match the filter or if an error occurs to be handled some how (ft empty or a feedback error or...)

  2. same as one, the feature grid should contain the records that match the filter

Current Result

  1. the feature grid does not filter anything because of the failing request, it shows 0 elements with records in the grid
    image

  2. the feature grid is empty

Other useful information (optional):

note: it happens also on production

Try also other operators since also the < has the same problem

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions