# Badges not being granted for restricted categories

**URL:** https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141
**Category:** Support
**Tags:** badges
**Created:** [16 أغسطس 2017، 8:52ص UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141 "2017-08-16T08:52:30Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [16 أغسطس 2017، 8:52ص UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/1 "2017-08-16T08:52:30Z")

</div>

I have a strange behavior on my forum. Basic badges (such as first like, first emoji etc.) that should be grated to users are not granted. Only admin users are granted these badges, while normal users are not.

So for example, I can login as a normal user, and _like_ as many posts as I want, and use as many emoji’s as I like, but I still won’t see the “First Like” and “First Emoji” badges.

Thing is, there are certain _early_ users that successfully got these badges. But recently all new users won’t get them.

I wonder if it has something to do with some settings that I’ve changed. Can somebody point me to a direction to check?

---

<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: [16 أغسطس 2017، 9:56ص UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/2 "2017-08-16T09:56:43Z")

</div>

> [@schungx](#):
>
> Thing is, there are certain early users that successfully got these badges. But recently all new users won’t get them.

Sounds like sidekiq is not running on your Discourse, so the background daily / weekly tasks are not working?

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [16 أغسطس 2017، 9:58ص UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/3 "2017-08-16T09:58:13Z")

</div>

I checked. Sidekiq is running and nothing queues. Emails are being sent…

Must be something with the badge granting queries?

Is there a place to check?

---

<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: [16 أغسطس 2017، 9:59ص UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/4 "2017-08-16T09:59:21Z")

</div>

Well you can see people are getting First Like here on meta, so it’s not a bug, but some kind of configuration issue with your instance:

[https://meta.discourse.org/badges/11/first-like](https://meta.discourse.org/badges/11/first-like)

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [16 أغسطس 2017، 11:34ص UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/5 "2017-08-16T11:34:57Z")

</div>

Are those categories read by everyone?

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [16 أغسطس 2017، 12:47م UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/6 "2017-08-16T12:47:18Z")

</div>

Those categories are restricted to users of a certain group, but most of the users are members of that group, so they can see.

@codinghorror I think it is a settings problem. Probably I set something on the way that blocks the badges from being handed out.

Is there a log or somewhere that I can check whether the badge queries are being run?

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [16 أغسطس 2017، 12:48م UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/7 "2017-08-16T12:48:47Z")

</div>

> [@schungx](#):
>
> Those categories are restricted to users of a certain group,

Badges are not allowed on security restricted categories.

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [16 أغسطس 2017، 12:49م UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/8 "2017-08-16T12:49:47Z")

</div>

Aha!

That might be it. So nothing a user does on categories not open to `Everyone` will earn badges that are tied to posts in those categories?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [16 أغسطس 2017، 12:57م UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/9 "2017-08-16T12:57:14Z")

</div>

That’s right. A community that I work with just moved a bunch of categories to be accessible only to some and all the badges went away, to the Dismay of many.

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [16 أغسطس 2017، 1:00م UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/10 "2017-08-16T13:00:48Z")

</div>

I think this reply here says basically the same thing:

> [@Badges don't work in private / restricted topics](https://meta.discourse.org/t/badges-dont-work-in-private-restricted-topics/67413/10):
>
> Well yeah, if any topic is in a restricted area it is no longer a candidate for badges. Category must be accessible by all users of the forum for it to be badgeable.

@sam I wonder if I restrict `everyone` to `See` or `Reply/See` for a category, will badges count then? Or will it only work on categories that have `everyone` ==\> `Create/Reply/See`?

Technically speaking, you don’t need to _create_ a post to earn a lot of badges – simply replying will work fine.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [16 أغسطس 2017، 1:02م UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/11 "2017-08-16T13:02:59Z")

</div>

It is lose-lose, if we granted them then people would complain 🎙 “why does Jane have first like and not have link to the post in the badges page, is there a bug 🐛”

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [16 أغسطس 2017، 1:04م UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/12 "2017-08-16T13:04:47Z")

</div>

> [@schungx](#):
>
> I wonder if I restrict everyone to See or Reply/See for a category, will badges count then? Or will it only work on categories that have everyone ==\> Create/Reply/See?

I _think_ everyone =\> read only will works.

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [16 أغسطس 2017، 1:07م UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/13 "2017-08-16T13:07:34Z")

</div>

So, in other words, the rationale behind this _feature_ is that, for fairness and openness sake, and to enable public audit of these “achievements”, any user must be able to verify the badges earned by somebody so that there is no chance of favoritism.

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [13 سبتمبر 2017، 3:44ص UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/14 "2017-09-13T03:44:35Z")

</div>

Sorry to bump this up again.

I understand that badges are not awarded for topics in restricted categories, however this leads to a very strange user experience.

For example, my forum has both restricted categories and open categories. People mostly participate in restricted categories, where they would do a lot of things without being awarded badges.

Then they did something in an open category, and then suddenly they are awarded a “First Like” badge or something, although they probably have Like’d many many times before in the restricted categories. This caused my users to ask WTF?

Is there any alternative to mitigate this, other than opening up many categories to Everyone?

---

<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: [13 سبتمبر 2017، 3:48ص UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/15 "2017-09-13T03:48:09Z")

</div>

I really don’t know, as I recall this was a decision @sam made long ago, it is unclear to me why this is a desired behavior.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [13 سبتمبر 2017، 3:50ص UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/16 "2017-09-13T03:50:29Z")

</div>

Cause the system is not auditable if we did that

Now anyone can see who has a badge and why they have said badge

---

<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: [13 سبتمبر 2017، 3:51ص UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/17 "2017-09-13T03:51:57Z")

</div>

And existing badges are removed, if topics / posts that originally triggered the badge are moved to secure categories, as I recall.

---

<div class="post-metadata">

### Author: ![scombs](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/scombs/32/48616_2.png) [@scombs](https://meta.discourse.org/u/scombs)
#### Post date: [13 سبتمبر 2017، 4:21ص UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/18 "2017-09-13T04:21:00Z")

</div>

Could a compromise be that actions related to a specific post in a restricted category just display as **private** or even better show to users with rights to see that post?

Alternatively just turn off the info displayed about the reason for the badge via a setting.

The admins can dig around in the database if needed. I know some users will game the system but who cares? The goal is to reward good behavior. The bad guys are winning under the current system.

---

<div class="post-metadata">

### Author: ![tophee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tophee/32/73406_2.png) [@tophee](https://meta.discourse.org/u/tophee)
#### Post date: [13 سبتمبر 2017، 5:51ص UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/19 "2017-09-13T05:51:46Z")

</div>

> [@scombs](#):
>
> Could a compromise be that actions related to a specific post in a restricted category just display as private or even better show to users with rights to see that post?

Yes (though I’m not sure \*exactly \* what you mean here), I also think it would make sense to restrict information about the awarding post rather than not awarding the badge at all.

So, more specifically: from what I understand, the only problem is the link to the awarding post, because even if a user doesn’t have access to that post, the url would reveal information about the post, right? So what is needed is some mechanism that either renders or doesn’t render the link _when it is displayed_ (probably too much effort) or that either includes or doesn’t include the link in the first place, i.e. when the badge is awarded.

If none of these compromises works, I would still welcome a setting that turns off the badge audit trail altogether and then awards badges regardless of restrictions.

---

<div class="post-metadata">

### Author: ![schungx](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/schungx/32/70989_2.png) [@schungx](https://meta.discourse.org/u/schungx)
#### Post date: [13 سبتمبر 2017، 6:19ص UTC](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141/20 "2017-09-13T06:19:58Z")

</div>

> [@tophee](#):
>
> a setting that turns off the badge audit trail altogether and then awards badges regardless of restrictions.

This I think will satisfy a _lot_ of people running mostly-restricted forums.

[Next page](https://meta.discourse.org/t/badges-not-being-granted-for-restricted-categories/68141.md?page=2)
