Making a user's primary group non-visible (eventually) leads to a missing page


(Alex Armstrong) #1

I’m guilty of trying something weird. But the system does allow it :blush:

All the users in our Discourse are automatically members of groups based on their institutional affiliation (@myuni.edu or whatever). I’ve made these institutional groups the “primary” groups. I did this because I’m using the group’s “title” field to convey users’ institutional affiliation.

Here’s what it looks like in a topic:

For various reasons, I don’t want these groups to be visible to users. So I’ve made them hidden them (using the Group is visible to all users option).

Unfortunately, when someone clicks on the institution’s name (as shown in the above screenshot) they get taken to a non-existent page (/groups/myuni or whatever). I had tested this at some point and I could have sworn that these titles became unclickable if the group was made hidden.

Next steps:

  • Do I need to re-bake all the posts (or whatever the Discourse term turns out to be)?
  • Otherwise, it would be swell if these titles can be made non-clickable when the group is not visible to users.

Hidden Group Membership
(Joshua Rosenfeld) #2

This has come up before. Unfortunately, the only solution at this point seems to be custom code:


(Alex Armstrong) #3

Thanks! The JS in your first link solves my problem. But this is kind of a #bug methinks.


(Jeff Atwood) #4

So… don’t do that? Seems pretty expected to me. You made the primary group invisible.


(Florian) #5

I don’t find it that weird. Using groups seems to be the standard way of adding custom avatar flairs and if you’re creating the group only for that purpose, having it non-visible makes sense (plus there are probably more reasons to hide a group page, even it is the primary group).

Displaying the group name as a link that results in a permission error doesn’t seem expected to me.