osmcha-frontend icon indicating copy to clipboard operation
osmcha-frontend copied to clipboard

Location search fail

Open misibacsi opened this issue 2 years ago • 4 comments

I'm submitting a (bug report/feature request/ support or question)

I'm submitting a bug report.

Brief Description

Search location failed. Searched: hungary, germany - as "country" or "budapest", london - as "city"

Interesting, that it finds "new york" for example (and probably many others).

Other filter applied: "date" from 2023-08-23 to 2023-08-24

Zero result.

What is the current behaviour, (attach relevant screenshots) ?

2023-08-25 OSMCHA search fail

What is the expected behaviour ?

Some result or a short explanation what is missing.

When does this occur ?

Today, 2023-08-24

How do we replicate the issue ?

  1. select "country"
  2. add "date" filter for 1 day
  3. search for "hungary" or "germany"

Please tell us about your environment:

DuckduckGo on Android Firefox, Opera on Windows 11

All are fresh versions.

Other Information / context:

misibacsi avatar Aug 25 '23 08:08 misibacsi

This could be related to the language that is used in the search results, returned from Nominatim.

What are your locale or language settings? I experience the same problem and have the following list set in Firefox:

  • Finnish [fi-fi]
  • Finnish [fi]
  • English (US) [en-us]
  • English [en]
  • Japanese [ja]

As a result, even if I search "Hungary", Nominatim returns the Finnish name "Unkari". This is because Firefox sends the HTTP header Accept-Language: fi-FI,fi;q=0.8,en-US;q=0.6,en;q=0.4,ja;q=0.2 to it. It looks like the search box then tries to find "Hungary" from the list that contains only "Unkari" and does not find anything. If I search with the Finnish name "Unkari", the correct result is displayed.

lliehu avatar Aug 26 '23 10:08 lliehu

It could be, bit it is not the case. I tried "hungary" and "magyarország", "germany" and "németország". (the latter ones are the same name in Hungarian).

My Firefox is set only to "Hungarian" and "English" as languages.

I think OSMcha should require English names, but unfortunately it is not shown what languages are allowed / accepted for location search.

I tried Nominatim https://nominatim.openstreetmap.org/ui/search.html?q=hungary&accept-language=hu and it finds "Hungary", so it is not Nominatim-related problem.

misibacsi avatar Aug 26 '23 10:08 misibacsi

Hmm, I can reproduce a problem where the following happens:

  1. Type a name and it's found.
  2. Type another name and it's NOT found even though it should be (and even though a request to Nominatim was made and Nominatim found the name).
  3. Clear the field.
  4. Type the previous name again and this time it IS found, strangely.

Could this be related or is there no way you can get it to find the country even with a bit of fiddling?

lliehu avatar Aug 26 '23 11:08 lliehu

Got the same issue. I was trying to search "Slovakia", "Slovensko" and nothing was found.

Firefox desktop version: 121.0 Languages desktop: sk; cs; en-us; en

Firefox mobile version: 121.0 Languages mobile: Slovenčina (Slovensko)

Edit: I recommend to save settings in another browser. Then open these saved settings on Firefox. It will not show boundaries of selected location on map, but it is filtering it.

Filip10 avatar Dec 25 '23 07:12 Filip10