[openstreetmap/openstreetmap-website] Cannot calculate any directions – Uncaught TypeError: OSM.i18n.currentLocale is not a function (Issue #5821)
Openstreetmapler
notifications at github.com
Wed Mar 19 16:33:28 UTC 2025
Openstreetmapler created an issue (openstreetmap/openstreetmap-website#5821)
### URL
https://www.openstreetmap.org/directions?engine=fossgis_valhalla_car&route=42.038752%2C13.626598%3B42.038752%2C13.626598#map=19/42.038804/13.627943
### How to reproduce the issue?
Go to the above URL. The route will never be calculated and there’s an endless loading spinner.
### Screenshot(s) or anything else?
Error in the browser console:
```
17:23:32.586 Uncaught TypeError: OSM.i18n.currentLocale is not a function
getRoute https://www.openstreetmap.org/assets/index-fb5318a386ef84e62dbd686715e843ad6afc2cb94d8c1c31114220032f53d736.js:9
s https://www.openstreetmap.org/assets/index-fb5318a386ef84e62dbd686715e843ad6afc2cb94d8c1c31114220032f53d736.js:8
y https://www.openstreetmap.org/assets/index-fb5318a386ef84e62dbd686715e843ad6afc2cb94d8c1c31114220032f53d736.js:9
setValue https://www.openstreetmap.org/assets/index-fb5318a386ef84e62dbd686715e843ad6afc2cb94d8c1c31114220032f53d736.js:8
d https://www.openstreetmap.org/assets/index-fb5318a386ef84e62dbd686715e843ad6afc2cb94d8c1c31114220032f53d736.js:9
load https://www.openstreetmap.org/assets/index-fb5318a386ef84e62dbd686715e843ad6afc2cb94d8c1c31114220032f53d736.js:9
run https://www.openstreetmap.org/assets/index-fb5318a386ef84e62dbd686715e843ad6afc2cb94d8c1c31114220032f53d736.js:9
load https://www.openstreetmap.org/assets/index-fb5318a386ef84e62dbd686715e843ad6afc2cb94d8c1c31114220032f53d736.js:9
<anonymous> https://www.openstreetmap.org/assets/index-fb5318a386ef84e62dbd686715e843ad6afc2cb94d8c1c31114220032f53d736.js:1
u https://www.openstreetmap.org/assets/application-819d5ef9c9be076fee37756c270ec7ab72d539c4e87c6a55121841d48df2e845.js:12
d https://www.openstreetmap.org/assets/application-819d5ef9c9be076fee37756c270ec7ab72d539c4e87c6a55121841d48df2e845.js:12
index-fb5318a386ef84e62dbd686715e843ad6afc2cb94d8c1c31114220032f53d736.js:9:8703
```
This JavaScript crash prevents the fetch-route code from executing, as there’s never a network request sent for getting directions.
As the missing function is called `currentLocale`, I tried [changing the language of my OSM account](https://www.openstreetmap.org/preferences) from German to English, to no avail.
Yesterday (18 March 2025, 18:00 UTC), it worked fine, but today (19 March, 16:20 UTC), it’s broken. A recent commit might have broken something, so please review them one more time. **Please do it quickly!**
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/5821
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/5821 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250319/7975ea02/attachment.htm>
More information about the rails-dev
mailing list