Suggestive Search Issue for Tagging Groups


Noticed a minor issue with the suggestive search when typing a @ group tag today.

After a little investigation it would seem that;

Group is visible to all users

has to be enabled in order for it to appear in the search results, but we wouldn’t want to make this group visible to everyone but feel that it should still appear in the search for those that are allowed to message or mention as per the subsequent setting;

Is this something that could be fixed, or, is this intended behaviour? Or, have I interpreted something incorrectly?

Thanks in advance, as always, for your help :slight_smile:

1 Like

Can you explain this in more detail, maybe with some screenshots? I’m struggling following what you are trying to convey.

1 Like

Hi @cpradio,

Thanks for the reply and yes, of course, sorry if the post was unclear.

Steps to Reproduce:

  1. Post new topic to a restricted category, available only to moderators, admins and members of the specific group
  • Enter text to post, use tagging to enter @group_name

  • @group_name doesn’t appear in suggestive search results, as a user would

  • Type tag in fully anyway, Preview Pane displays grey tag marker - tag works

  • Submit topic, notifications received by members of the group

  1. Check Group Settings under Admin
  • Enabled Group is visible to all users for specific group
  1. Repeat step 1


@group_name does not appear in suggestive search unless Group is visible to all users is enabled in group settings, despite having specified who can access the restricted group, e.g. moderators, admins and group members.

Expected Result:

@group_name appears in suggestive search results for any moderator, admin or group member of the specific group. @group_name does not appear in suggestive search for all users unless, Group is visible to all users is enabled.

I hope the above makes a bit more sense and that the screenshots are beneficial :slight_smile:



Just wondered if there was any update on this one yet? I’ve checked out hosted solution but the behaviour is still the same, so no sneaky fixes have been rolled out :slight_smile:

Any news would be appreciated :slight_smile:

Hi @cpradio,

Any news on the above issue yet?

Thanks in advance for an update. :slight_smile:

Hey @codinghorror, @sam, @cpradio, @Falco,

Sorry for the mass tagging, just haven’t heard anything on this one and was hoping to get an update.

I’ve checked our hosted solution and don’t notice any changes, so there doesn’t appear to have been a quiet fix etc.

Thanks in advance for any news. :slight_smile:

The actual bug here is a bit more subtle,

@group should not be styled at all OR show up in search results if group is invisible from all users. Otherwise it is just too hard to get the security nuance right. (Examples, post PM to group, then add a user that has no access to group. Post in category only visible to group, change category permissions)

Its incorrect to be styling it at all on posts that are visible to people who are not moderators or members of the groups, cause you would be exposing the information of the group’s existence.

Hi @sam,

Thank you for the response, appreciated.

You lost me a little in the detail there as I am not as familiar with it all as you are obviously.

Are you saying that, even with a bug fix, we wouldn’t be able to search for the @group when wanting to tag the members of the group in a post, within a category limited to only those people (and mods and admins)?

It is enormously hard to get the security right in this case. If you move posts around you would expose the groups existence.

It may be fixable but would probably take a few days of work.

Why do you need @studentinstructors to be a hidden group? Why are users not allowed to know it exists?

I see.

The student instructors raise issues that they are unable to resolve or item that they need to query, provately with the specific instructors. They then give a response/answer which is then reported back to students. This is off of the forum on another platform.

If the group were made more visible there is the opportunity for them to be contacted more directly by students seeking further support on a 1 to 1 basis which is outside of the scope of what is offered etc.

But can’t you just hide bits of the groups page with CSS?

Without .group-nav and .group-members there is pretty much nothing to see on that page. We can easily add a CSS class to denote group name there so it is easily targetable.

Hi @sam,

I haven’t personally customized any of the forum.

Whilst I am sure it would hide things in the way you describe, it doesn’t seem overly straight forward.

The screenshots from the issue raised above suggest built in functionality to not make a group public, and limit the specific access to a group, it seems odd, to me at least, that you cannot then search for that specific group in the way described which works across the rest of the sight.

I fully appreciate I have limited experience with Discourse so am invariably missing something.

Can you explain to me again why having this functionality would be so bad, I am trying to get my head around what you said in your previous reply about people’s permissions and posts being moved around etc?

The problem is that you want to hide the existence of a group from the general public.

To do so correctly, when you type @group it should not show up with any special styling for users who are not supposed to see it.

For example, the group @ninjas is not visible to the general public on meta, but here it has the special styling. So, in effect, users know that the group @ninjas exists.

To support a squeeky clean implementation here we would need for the “special” @ninjas styling only to show up for people who are allowed to see the group.

I can add @ninjas to the suggestive search, but then I also need to remove the styling to complete the fix here. Removing the styling would cause confusion if you use the feature, so its back to square 1. Cause your end users will see when they click @ninjas:


  1. looks bad
  2. exposes the fact the group exists

Hi @Sam,

Thanks for the run through.

In the screenshot in step 2 above, it does clearly stated that group members can @mention the group, but I am guessing that it doesn’t relate to the Group is visible to all users option, e.g. they are separate.

I can either, make the group visible to everyone and then limit who can @mention (as per the screenshot), or, only make it invisible and then the option becomes a little redundant?

If the group is visible, and the @mention is limited as per the screenshot, will all users still see the group in the suggestive search, even though they would then not be allowed to use it?

Which ever way I try to get my head around this it seems not quite right.

Sorry, if I am dragging this out, it isn’t my intention, I am just trying to follow and understand.