[openstreetmap/openstreetmap-website] Untranslatable strings 6 (Issue #6367)
mmd
notifications at github.com
Sat Aug 30 16:56:14 UTC 2025
mmd-osm left a comment (openstreetmap/openstreetmap-website#6367)
Since we're already logged on in step 3, the server renders the sidebar content as a logged on user when clicking on different notes. However, we haven't been updating the page header after the log on, so that OSM.oauth is still undefined in the first tab at this point -> Request fails with HTTP 401.
<img width="328" height="200" alt="Image" src="https://github.com/user-attachments/assets/bb3ee89b-0e2a-4e50-9295-7f0089641704" />
app/assets/javascripts/index/note.js - OSM.Note, function initialize:
```javascript
fetch(url, {
method: method,
headers: { ...OSM.oauth }, // << undefined oauth is undefined
body: data
})
.then(response => {
if (response.ok) return response;
return response.text().then(text => {
throw new Error(text);
});
})
```
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/6367#issuecomment-3239401214
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/issues/6367/3239401214 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250830/d6b9cd82/attachment.htm>
More information about the rails-dev
mailing list