Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a WFS layer with filter for non-existent attribute leads to broken layer #43950

Closed
pathmapper opened this issue Jun 28, 2021 · 0 comments
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! WFS data provider

Comments

@pathmapper
Copy link
Contributor

Describe the bug
Adding a WFS layer with filter for non-existent attribute leads to broken layer:

  • no checkbox to toggle visibility available (instead there's an image icon displayed)
  • removing the filter or updating the filter (filtering for an existing attribute) has no effect

grafik

How to Reproduce

  1. From the QGIS top menu: Layer -> Add Layer -> Add WFS Layer ...
  2. Add connection for: https://www.wfs.nrw.de/geobasis/wfs_nw_dvg
  3. For Layer DVG1 Kreise und kreisfreie Städte build the following query:

SELECT * FROM nw_dvg1_krs WHERE GN = 'non-existent-attribute'

grafik

  1. Add layer
  2. See error --> broken layer was added to the layer widget

QGIS and OS versions

QGIS version
3.20.0-Odense
QGIS code revision
decaadb
Qt version
5.15.2
Python version
3.9.5
GDAL/OGR version
3.3.0
PROJ version
8.0.1
EPSG Registry database version
v10.018 (2021-04-02)
GEOS version
3.9.1-CAPI-1.14.2
SQLite version
3.35.2
PDAL version
2.3.0
PostgreSQL client version
13.0
SpatiaLite version
5.0.1
QWT version
6.1.3
QScintilla2 version
2.11.5
OS version
Windows 10 Version 2009

Active Python plugins
QuickOSM
db_manager
MetaSearch
processing

@pathmapper pathmapper added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jun 28, 2021
@rouault rouault self-assigned this Sep 13, 2021
rouault added a commit to rouault/QGIS that referenced this issue Sep 13, 2021
rouault added a commit to rouault/QGIS that referenced this issue Sep 14, 2021
elpaso added a commit that referenced this issue Sep 30, 2021
…ackports

[Backport queued_ltr_backports ]WFS: try harder guessing the layer geometry type when a filter returns 0 features (fixes #43950)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! WFS data provider
Projects
None yet
Development

No branches or pull requests

3 participants