Bug report #17347

MetaSearch: Add WMS/WMTS data button broken

Added by Richard Duivenvoorde about 7 years ago. Updated almost 7 years ago.

Status:Closed
Priority:Normal
Assignee:Alessandro Pasotti
Category:MetaSearch Catalogue Client
Affected QGIS version:master Regression?:No
Operating System: Easy fix?:Yes
Pull Request or Patch supplied:Yes Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:25244

Description

In MetaSearch the Add Data button is broken.

To reproduce:
- add Default servers
- select Netherlands: National CSW
- search for Nieuwegein
- select first result 'Adressen Nieuwegein'
- try to add the data to the map via Add Data button/Add WMS/WMTS

AttributeError: 'QDialog' object has no attribute 'on_btnConnect_clicked'
Traceback (most recent call last):
File "/home/richard/bin/qgis_all/master/debug/share/qgis/python/plugins/MetaSearch/dialogs/maindialog.py", line 792, in add_to_ows
getattr(ows_provider, connect)()
AttributeError: 'QDialog' object has no attribute 'on_btnConnect_clicked'

Has probably to to with the changes in the WMS dialog's to become part of the Data Source Manager dialog? I know the connection between MetaSearch and ows services was a little fragile...

metasearch.png - To Reproduce (71.9 KB) Richard Duivenvoorde, 2017-10-28 09:58 AM

failingWFS.png - failing WFS (153 KB) Richard Duivenvoorde, 2017-11-13 08:51 PM


Related issues

Duplicated by QGIS Application - Bug report #17497: Metasearch 'QDialog' object has no attribute 'on_btnConne... Closed 2017-11-20

Associated revisions

Revision 1b79177b
Added by Alessandro Pasotti almost 7 years ago

[bugfix] Fix WFS in metasearch

Fixes #17347

Revision 3ea8b74e
Added by Tom Kralidis almost 7 years ago

[bugfix] [MetaSearch] fix Esri ArcGIS service chaining (fixes #17347)

Revision af6b4cc7
Added by Tom Kralidis almost 7 years ago

Merge pull request #5671 from tomkralidis/issue-17347

[bugfix] [MetaSearch] fix Esri ArcGIS service chaining (fixes #17347)

History

#1 Updated by Tom Kralidis almost 7 years ago

Looks like this part of the code needs updating based on the provider changes in master:

https://github.com/qgis/QGIS/blob/master/python/plugins/MetaSearch/dialogs/maindialog.py#L759-L792

The basic workflow is:
- add OWS URL from MetaSearch to QGIS connections
- open given provider (WMS/WMTS, WFS, WCS, etc.) connecting to the OWS URL from the QGIS connection combo (referenced by index)

#2 Updated by Alessandro Pasotti almost 7 years ago

The 'on_btnConnect_clicked' slot has been renamed to 'btnConnect_clicked'

#4 Updated by Tom Kralidis almost 7 years ago

Here is a standalone example workflow: https://gist.github.com/tomkralidis/dccb49efa760a585be38ee0c3188b8b3

when calling btnConnect_clicked, clicking ANY of the 'Ok', 'Close', or 'Add' buttons in the 'Add Layer(s) from a WMS Server' widget adds the layer. I'm not sure why 'Ok', or 'Close' would have the same behaviour as 'Add' when calling from Python

#5 Updated by Richard Duivenvoorde almost 7 years ago

Heard a special Request from Mr Pasotti :-)

Failing WFS too...

Again: select Netherlands National CSW
Search for 'gemeenten' = dutch municipalities
Select dataset 'Grenzen van alle Nederlandse gemeenten' (Borders of all dutch municipalities)
Select Add Data / Add WFS: Bingo (see screenshot)

#6 Updated by Alessandro Pasotti almost 7 years ago

  • Assignee changed from Tom Kralidis to Alessandro Pasotti

Let me have a deeper look ...

#7 Updated by Alessandro Pasotti almost 7 years ago

  • Pull Request or Patch supplied changed from No to Yes
  • Easy fix? changed from No to Yes

#8 Updated by Alessandro Pasotti almost 7 years ago

  • Status changed from Open to In Progress

#9 Updated by Anonymous almost 7 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

#10 Updated by Tom Kralidis almost 7 years ago

Added fixes for Esri services. WCS continues to work accordingly.

#11 Updated by Richard Duivenvoorde almost 7 years ago

Tested and working again \o/
Thanks people!

#12 Updated by Jürgen Fischer almost 7 years ago

  • Duplicated by Bug report #17497: Metasearch 'QDialog' object has no attribute 'on_btnConnect_clicked' added

Also available in: Atom PDF