geonetwork / geonetwork/core-geonetwork
Adding WFS service to map from metadata record not working
- Dominant language
- Java
- Stars
- 521
- Forks
- 514
- Avg merge
- 6d 13h
- Merged PRs (30d)
- 19
Description
Adding WFS services to the map using the 'Add to map' button from a metadata record does not work. The WFS is added to the map as a layer but does not appear on the map. The problem seems to be that 'version=undefined' is automatically added to the request in all cases, even when a specific version is written in the metadata record link.

Steps to reproduce the behavior:
1. Create a new metadata record using the general iso19115-3.2018 metadata scheme or the Dutch [iso19139.nl.geografie.2.0.0](https://github.com/metadata101/iso19139.nl.geografie.2.0.0) metadata scheme.
2. Add a link to a WFS service. I tried several options with and without version (see screenshot):
- https://geodata.zuid-holland.nl/geoserver/landelijk_gebied/wfs?service=WFS&version=2.0.0&request=GetCapabilities
- https://geodata.zuid-holland.nl/geoserver/landelijk_gebied/wfs?service=WFS&version=1.1.0&request=GetCapabilities
- https://geodata.zuid-holland.nl/geoserver/landelijk_gebied/wfs?
3. Open the newly added record and click on the 'Add to map' button next to the WFS service link .
4. The WFS service is added to the map as a layer but nothing is shown on the map.

Test environments:
GeoNetwork 3.12.11 server installation with iso19139.nl.geografie.2.0.0 metadata scheme opened with Chrome on Windows
GeoNetwork 3.12.10 Docker installation with iso19115-3.2018 metadata scheme opened with Safari on Mac OSX
Contributor guide
Research direction
Start at the metadata record's “Add to map” button and trace how the WFS service URL is turned into a map layer request. Reproduce the issue with the supplied WFS URLs, then verify that the generated request no longer contains an unintended undefined version and that the layer appears on the map.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100