# Subfolder install User blocked due to community flags message has wrong URL to Profile

**URL:** <https://meta.discourse.org/t/subfolder-install-user-blocked-due-to-community-flags-message-has-wrong-url-to-profile/36685>\
**Category:** Bug\
**Created:** [December 14, 2015, 2:12pm UTC](https://meta.discourse.org/t/subfolder-install-user-blocked-due-to-community-flags-message-has-wrong-url-to-profile/36685 "2015-12-14T14:12:42Z")\
**Posts on this page:** 4\
**Page:** 1

## AI-generated summary

A bug was reported where automated "user blocked" emails in a Discourse subfolder installation generate incorrect profile URLs, duplicating the subfolder path (e.g., `/community/community/users/...`) [cpradio](/t/-/36685/1). This issue, which began after moving to a subfolder install, affects both the user profile link and the admin user management link. [codinghorror](/t/-/36685/2) identified this as a valid subfolder bug. [neil](/t/-/36685/3) subsequently pushed a fix for the broken links and discovered an additional bug regarding account activation redirects, which was also resolved.

<div class="post-metadata">

**Author:** ![cpradio](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/cpradio/32/4970_2.png) [@cpradio](https://meta.discourse.org/u/cpradio)\
**Post date:** [December 14, 2015, 2:12pm UTC](https://meta.discourse.org/t/subfolder-install-user-blocked-due-to-community-flags-message-has-wrong-url-to-profile/36685/1 "2015-12-14T14:12:42Z")

</div>

In the below message, the first and last link has /community/community/ referencing the subfolder name twice creating a broken link. The last link should be going to /community/admin/users/meghaf, and the first to /community/users/meghaf

> [@On another topic](https://meta.discourse.org/t/209903/1):
>
> This is an automated message.
> 
> The new user [meghaf](https://www.mydomain.com/community/community/users/meghaf) was automatically blocked because multiple users flagged meghaf’s post(s).
> 
> Please [review the flags](https://www.mydomain.com/community/admin/flags). If meghaf was incorrectly blocked from posting, click the unblock button on [the admin page for this user](https://www.mydomain.com/community/community/users/meghaf).
> 
> This threshold can be changed via the `block_new_user` site settings.

The above issue began for our community around November 12th, which is when we moved to a sub-folder install. Messages prior to that date work correctly.

I’ve dug into it enough to know this is from an email template, but I didn’t dig far enough to see how %{base\_url} and %{user\_url} are being set.

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [December 15, 2015, 1:20am UTC](https://meta.discourse.org/t/subfolder-install-user-blocked-due-to-community-flags-message-has-wrong-url-to-profile/36685/2 "2015-12-15T01:20:47Z")

</div>

Looks like a valid subfolder bug @neil can you add it to your list?

---

<div class="post-metadata">

**Author:** ![neil](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neil/32/102150_2.png) [@neil](https://meta.discourse.org/u/neil)\
**Post date:** [December 15, 2015, 8:08pm UTC](https://meta.discourse.org/t/subfolder-install-user-blocked-due-to-community-flags-message-has-wrong-url-to-profile/36685/3 "2015-12-15T20:08:08Z")

</div>

I pushed a fix for that. Also, while testing it I found a bug with account activation redirecting to the wrong url, so that’s fixed too. 🐛

---

<div class="post-metadata">

**Author:** ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)\
**Post date:** [December 15, 2015, 10:27pm UTC](https://meta.discourse.org/t/subfolder-install-user-blocked-due-to-community-flags-message-has-wrong-url-to-profile/36685/4 "2015-12-15T22:27:42Z")

</div>

Closed on December 15, 2015, 10:27pm UTC


