When I click the flag icon under a post, a dialog pops up and the “our community guidelines” link doesn’t work. Tapping it doesn’t do anything, and when I open it in another tab, I get a “400 Bad Request” error page. Example URL: https://discuss.python.org/t/my-code-as-a-for-loop-that-dont-work/%{base_path}/guidelines
Still doesn’t work…
Does nobody in charge care? @moderators
It works fine for me.
What’s the link’s URL for you?
Ah, it seems to be a mobile-view-only problem. With that, still nothing happens when I click and the URL is for example:
https://discuss.python.org/t/community-guidelines-link-doesnt-work/55029/%{base_path}/guidelines
When I tell my browser to use desktop mode, it works and the URL is:
You may have NoScript or some other privacy filter running preventing the JavaScript templating from working correctly. It does work fine for me in Brave.
I didn’t install/configure anything like NoScript, and I don’t think something like that was pre-installed (I’m using the Chrome browser on a Google Pixel 6a bought from the Google store).
I have the same problem with Firefox on iOS (link is broken, but switching to desktop mode fixes it). The problem also reproduces with Safari on iOS (unsurprising since it’s the same browser engine). I do not have JavaScript disabled (Discourse wouldn’t work at all anyway) nor any particular ad blocker / user scripts / anything.
FWIW it’s reproducible in developer mode on Firefox 128.0 on Ubuntu 22.04 by selecting an Android UA:
I don’t see this issue on another instance I moderate, but that is running an older version of Discourse. I don’t know if I have flagging permissions on any other discourses to see if it reproduces elsewhere.
Discourse seems to use different text templates for mobile vs. desktop. Only the mobile version includes the “%{base_path}” prefix. The desktop version doesn’t. Probably something the @admins can fix, unless it’s hardwired into Discourse.
I just looked into the settings on another Discourse forum where I’m an admin. it looks like the template used on desktop is topic_flag_types.inappropriate.description
while the one on mobile is topic_flag_types.inappropriate.short_description
.
Both currently contain the template:
Seems like a bug in some versions of Discourse to not interpolate for mobile.
Seems like it was reported, but no follow up came from it:
I’ve modified the strings to not use the interpolation for now.
I can confirm that it’s working now. Thanks.