RGJ
(Richard - Communiteq)
23 Febbraio 2026, 11:09am
1
Il link dell’URL breve a un’esportazione utente nella pagina di amministrazione utente non funziona quando viene eseguito in una configurazione con sottocartella; restituisce una pagina “Oops! Questa pagina non esiste o è privata”.
Il link funziona dall’interno del PM che viene inviato.
Quando si preme F5 sulla pagina “Non trovato”, o quando si fa clic con il tasto destro sul link, il file viene scaricato, quindi questo sembra essere un problema di routing di Ember.
Riga: discourse/frontend/discourse/admin/components/admin-user-exports-table.gjs at 6759ad71cac395697b2978eb34fcfbf1162d30d1 · discourse/discourse · GitHub
Correzione rapida (e, immagino, sporca): aggiungere target="_blank"
3 Mi Piace
Grazie @RGJ Sarà risolto da
main ← fix/server-side-only-urls-subfolder
opened 05:07PM - 23 Feb 26 UTC
On subfolder setups, clicking server-side-only links (e.g. upload download links… on the admin user exports page) resulted in a "page doesn't exist" error instead of downloading the file.
When Discourse runs in a subfolder (e.g. /forum), URLs like `/forum/uploads/short-url/abc.csv.gz` were not matching the SERVER_SIDE_ONLY regex patterns (e.g. `/^\/uploads\//`) because the pathname still included the subfolder prefix at the point of the check. This caused `routeTo` to hand the URL to Ember's router instead of redirecting to the server, hitting the catch-all "unknown" route.
The fix strips the subfolder prefix using `withoutPrefix()` before checking against SERVER_SIDE_ONLY patterns. The original path (with prefix) is still passed to `redirectTo`, which correctly handles both prefixed and unprefixed URLs via `getURL()`.
This only surfaced for the admin user exports page because most upload links in post content go through `click-track.js` which calls `redirectTo()` directly for `.attachment` links, bypassing `routeTo()` and its SERVER_SIDE_ONLY check entirely.
https://meta.discourse.org/t/396783
3 Mi Piace
zogstrip
Chiuso
28 Febbraio 2026, 7:00am
5
Questo argomento è stato chiuso automaticamente dopo 4 giorni. Non sono più ammesse nuove risposte.