geonetwork / geonetwork/core-geonetwork

Metadata editor - Geographic bounding box filter by regions doesn't work fine due to RegionsApi cache

Open
#2,828 5 comments 0 reactions 0 assignees View on GitHub
bug stale
Dominant language
Java
Stars
521
Forks
515
Avg merge
6d 13h
Merged PRs (30d)
19

Description

Tested in 3.4.x branch:

1) Clean JS&CSS wroj4j cache and in Admin > Tools menu.
2) Use an incognito window to discard browser cache issues.

3) Create an iso19139 metadata. In Geographic bounding box select the option **Continents** and start typing, suggestions are displayed

![bbox-continents-1](https://user-images.githubusercontent.com/1695003/40776725-ed7e9f52-64cb-11e8-9f0b-9b07127424e8.png)

4) Save and close the metadata editor and edit again the metadata (or create a new one). In Geographic bounding box select the option **Continents** and start typing, suggestions are **not** displayed this time.

![bbox-continents-2](https://user-images.githubusercontent.com/1695003/40776736-f4d4ef2c-64cb-11e8-9107-7e0f8ab80d70.png)

In this case, the backend code returns `null` https://github.com/geonetwork/core-geonetwork/blob/3.4.x/services/src/main/java/org/fao/geonet/api/regions/RegionsApi.java#L122-L124, seems expects the browser has already cached the response from previous request, but doesn't seem the case and causes the described issue.

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in the metadata editor by selecting Geographic bounding box > Continents, typing for suggestions, reopening or creating metadata, and repeating the search. Then inspect services/src/main/java/org/fao/geonet/api/regions/RegionsApi.java around lines 122-124, focusing on the cache-dependent null response. Done means region suggestions appear reliably after reopening the editor without relying on a prior browser-cached response.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
api, frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.