Base_path not being substituted in some cases

I’m not sure when this started, but it seems like %{base_path} isn’t being substituted in some instances.

The only place that I’ve seen this so far is the report a post prompt, where the url has the topic id replaced with %%7Bbase_path%7D/guidelines so https://www.example.com/t/topic-title/1234 becomes https://www.example.com/t/topic-title/%%7Bbase_path%7D/guidelines.

I tested and verified that this also happens in safe mode.

The text of post_action_types.inappropriate.description is the default:

This post contains content that a reasonable person would consider offensive, abusive, to be hateful conduct or a violation of <a href="%{base_path}/guidelines">our community guidelines</a>.

I tested changing the text while keeping the link the same. The changes do appear, but the issue is still there.

I checked another instance of %{base_path}, specifically site_settings.tags_listed_by_group which does appear to substitute correctly. The tags listed by group site setting does have a working link in the description.

4 Likes

This was also reported on the Python forum: "community guidelines" link doesn't work - Discourse Feedback - Discussions on Python.org

3 Likes

Just to pull the Python post over here for visibility:

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

I can repro the issue with ‘community guidelines’ here on meta as well. I’ll slip this over to bug. :+1:

Fixed in this PR:

2 Likes

This topic was automatically closed after 3 days. New replies are no longer allowed.