Issue with FAQ link on edge case subfolder setup

First, this is an edge case very specific to my setup, with the /f subfolder.

Discourse link on hamburger menu points to /faq, without the subfolder, because /faq startsWith /f.

Considering this quote:

I guess we could change

  const found = url.startsWith(baseUri);

to something like

  const found = url === baseUri || url.startsWith(`${baseUri}/`);

So it would match /f, /f/, /f/faq, but not /faq, correctly prepending the baseUri to the latter.

Anyway, the route itself also doesn’t work, /f/faq returns a 404, so I think there’s similar logic on the router level. I’ve previously noticed that /f/following wasn’t working as well (cc @merefield).

Finally, I changed the faq url site setting to /f/guidelines as a workaround, which fixed the link and the 404, but generated a minor oddity of having both the Guidelines and FAQ terms on the nav bar, both pointing to what’s set on faq url (you can check on the actual page):


Sorry for this kind of kitchen sink topic with 3 issues, but I think they’re so related that it’d be hard to separate them properly.



I’ve sent a PR to address the get-url issue:

About the 404 on /f/faq and /f/favicon/proxied, when I CURL these routes inside the container, bypassing Nginx, it works. I was able to fix it by changing the location directive described in Subfolder support with Docker from location /subfolder to location /subfolder/.

The nav bar showing both Guidelines + FAQ is the expected behavior, it’s unlikely the user will override the faq url with the same url.


Does mean we are good to close? :slight_smile: the NGINX issue is fixed with more documentation?

1 Like

Yes, we’re good. I’ve proposed the change on the howto topic.


1 Like

Oh that is a wiki, feel free to edit it! :heart:

1 Like