When I grant admin access, the link that gets sent in the e-mail is incorrect. Instead of being:
http://mysite/forum/path/to_confirm
it is:
A discussion about an issue with the admin link in subfolder mode being incorrect has revealed several related problems. nadiasvertex initially reported that the link sent in the admin access email was incorrect, and neil confirmed it was a subfolder bug and fixed it.
Ivan_Rapekas then reported several other issues, including badges notifications with incorrect URLs, a FAQ button with a wrong location, and an unsubscribe link in digest email being incorrect. neil fixed the unsubscribe link and found another issue with the “About” link.
Ivan_Rapekas further explained the issues with the FAQ button and the /about section, and provided examples of emails with incorrect URLs. neil acknowledged the problems and fixed some of the links, including a subfolder bug affecting links starting with /my.
An additional issue was reported by Ivan_Rapekas, where Discourse handles external links in custom headers as part of the forum, causing redirects to incorrect URLs. neil suggested a possible workaround, but Ivan_Rapekas pointed out that Discourse should only detect route changes for the subfolder path, not the root URL.
When I grant admin access, the link that gets sent in the e-mail is incorrect. Instead of being:
http://mysite/forum/path/to_confirm
it is:
This might be a valid sub folder bug @neil?
Yes, the code is explicitly using the no-subfolder URL: base_url_no_prefix
I’ll fix.
EDIT: fixed
Possible the same problems:
Thanks @Ivan_Rapekas. I fixed the unsubscribe link in digest email, and found that the “About” link was wrong here:
But the FAQ one is correct there and in hamburger menu. Where did you find the FAQ button with the wrong url?
This is an example of hard-coded URLs in our translation files, which is something we need to stop doing.
Hi @neil , thank you for the fast reply and actions!
I found that emails may contain wrong url or not, it depends on the kind of notification. For example:
[forum name] Summary in the subject has incorrect URL[forum name] [category] topic name in the subject has correct URL[forum name] [PM] Backup completed ... in the subject has correct URL[forum name] [PM] Data export ... in the subject has correct URLI meant FAQ button from the menu, but the same problem can be reproduced in the /about section.
My forum works in the folder /discuss. I set external URLs for all buttons here: <base_url>/discuss/about
Sorry for my Joda-style english ![]()
Which url in the email is incorrect?
About the other problem, I can see it happening on your site but can’t reproduce it unfortunately.
I’ll fix some of the other links.
Another subfolder bug: All links starting with /my are broken in subfolder.
Hi, there is another issue with subfolder.
My website is located at https://www.example.com
The forum is located at https://www.example.com/discuss
I made a custom html header in the default theme:
<a href="https://www.example.com/faq">FAQ</a>
When I click the link in my header, it redirects me to
https://www.example.com/discuss/faq instead of https://www.example.com/faq
It seems, that Discourse handles external links in custom header as part of forum.
I fixed that unsubscribe link.
For your custom html header, you’re using a route that the exists in the Discourse app, so the javascript is handling it. Maybe adding target='_blank' to that link would work, or change it to a path that’s different that one of Discourse’s routes.
But, shouldn’t Discourse detect only route changes for https://www.example.com/discuss/ paths? Why does it react on changes with https://www.example.com/ prefix ?
The same problem persists for all our menus, including, for instance, https://www.example.com/case-studies that does not exist in discourse as a route. In this case Discourse opens https://www.example.com/discuss/case-studies on click by link and shows 404 Page “Oops! That page doesn’t exist or is private”.