# On some forums, NaN instead of a number on badge pages

**URL:** https://meta.discourse.org/t/on-some-forums-nan-instead-of-a-number-on-badge-pages/387842
**Category:** Bug
**Tags:** badges, fixed
**Created:** [November 7, 2025, 1:59am UTC](https://meta.discourse.org/t/on-some-forums-nan-instead-of-a-number-on-badge-pages/387842 "2025-11-07T01:59:20Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![Quercus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/quercus/32/528795_2.png) [@Quercus](https://meta.discourse.org/u/Quercus)
#### Post date: [November 7, 2025, 1:59am UTC](https://meta.discourse.org/t/on-some-forums-nan-instead-of-a-number-on-badge-pages/387842/1 "2025-11-07T01:59:20Z")

</div>

On some Discourse forums, for example Python and iNaturalist, NaN appears instead of a number on some pages related to badges.

See [iNaturalist Forum: NaN instead of a number on badge pages](https://forum.inaturalist.org/t/nan-instead-of-a-number-on-badge-pages/72416).

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [November 7, 2025, 8:55am UTC](https://meta.discourse.org/t/on-some-forums-nan-instead-of-a-number-on-badge-pages/387842/2 "2025-11-07T08:55:35Z")

</div>

I can see it here on Meta too. For example on [https://meta.discourse.org/badges/114/bug-reporter?username=nat](https://meta.discourse.org/badges/114/bug-reporter?username=nat)

 ![Screenshot_20251107_094404_Firefox](https://global.discourse-cdn.com/meta/original/4X/d/0/9/d09978993d36386c443da993101cabbe66d90f42.jpeg)

I must be overlooking something

> <https://github.com/discourse/discourse/blob/7d5cb8edc0b2589e3a05f0935ef8365e9bea5397/frontend/discourse/app/controllers/badges/show.js#L49-L52>

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [November 7, 2025, 9:15am UTC](https://meta.discourse.org/t/on-some-forums-nan-instead-of-a-number-on-badge-pages/387842/3 "2025-11-07T09:15:23Z")

</div>

I think I found it. It’s related to the changes in [DEV: Replace deprecated Ember's array `.pushObjects` by megothss · Pull Request #35663 · discourse/discourse · GitHub](https://github.com/discourse/discourse/pull/35663). That change made `userBadges` an array, but `othersCount` still expects something with a `grant_count` value.

---

<div class="post-metadata">

### Author: ![Quercus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/quercus/32/528795_2.png) [@Quercus](https://meta.discourse.org/u/Quercus)
#### Post date: [November 7, 2025, 12:36pm UTC](https://meta.discourse.org/t/on-some-forums-nan-instead-of-a-number-on-badge-pages/387842/4 "2025-11-07T12:36:16Z")

</div>

> [@Moin](#):
>
> I think I found it. …

Thanks. Will the eventual fix require any subsequent action on the part of maintainers of individual Discourse forums, or will the fix propagate automatically to those forums?

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [November 7, 2025, 12:49pm UTC](https://meta.discourse.org/t/on-some-forums-nan-instead-of-a-number-on-badge-pages/387842/5 "2025-11-07T12:49:41Z")

</div>

Once the bug is fixed, the forum needs to be updated. On self-hosted forums, this is something the admin needs to do. iNaturalist is hosted by Discourse, so they take care of updates. This usually happens very regularly. Perhaps the person who fixes this will also make sure that the forum receives an update. However, I don’t know whether the bug is considered severe enough to warrant this.

---

<div class="post-metadata">

### Author: ![Quercus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/quercus/32/528795_2.png) [@Quercus](https://meta.discourse.org/u/Quercus)
#### Post date: [November 7, 2025, 12:59pm UTC](https://meta.discourse.org/t/on-some-forums-nan-instead-of-a-number-on-badge-pages/387842/6 "2025-11-07T12:59:47Z")

</div>

> [@Moin](#):
>
> However, I don’t know whether the bug is considered severe enough to warrant this.

Yeah, quite likely nobody has been losing any sleep over this detail, but it seemed to me a good idea to report it in case it also affected other details on the forums.

---

<div class="post-metadata">

### Author: ![twofoursixeight](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/twofoursixeight/32/574822_2.png) [@twofoursixeight](https://meta.discourse.org/u/twofoursixeight)
#### Post date: [November 7, 2025, 1:57pm UTC](https://meta.discourse.org/t/on-some-forums-nan-instead-of-a-number-on-badge-pages/387842/7 "2025-11-07T13:57:45Z")

</div>

I also just noticed this right now, I was going to file a bug report but then I found this topic.

 ![image](https://global.discourse-cdn.com/meta/original/4X/3/b/8/3b8d809a822eb0127ad47ed0ad5beb2ddb4c6e93.jpeg)

On forums that are not hosted by Discourse , the text is correct because something new with the code changed the badge page to NaN.

Forums that have not updated yet are not affected by this.

For example, the Dark Gaming forum uses `Discourse v3.6.0.beta1-dev` from this commit ([3352cec1bb](https://github.com/discourse/discourse/commits/3352cec1bb)) and everything is correct.

 ![image](https://global.discourse-cdn.com/meta/original/4X/e/5/c/e5ce70dcdda8f5ecbafb099a1e88442e0fc5eb0f.jpeg)

Another edit: Admins of the site can work around this by modifying the texts `js.badges.others_count.other` and `js.badges.others_count.one` but this bug is going to be fixed relatively quickly.

---

<div class="post-metadata">

### Author: ![Alteras](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/alteras/32/179824_2.png) [@Alteras](https://meta.discourse.org/u/Alteras)
#### Post date: [November 7, 2025, 6:07pm UTC](https://meta.discourse.org/t/on-some-forums-nan-instead-of-a-number-on-badge-pages/387842/8 "2025-11-07T18:07:00Z")

</div>

**Edit:**  
Looks like there’s already a merge in flight. Meta should be updated with it soon.  
[https://github.com/discourse/discourse/pull/35895](https://github.com/discourse/discourse/pull/35895)

* * *

This should fix the issue.  
[https://github.com/discourse/discourse/pull/35911](https://github.com/discourse/discourse/pull/35911)

---

<div class="post-metadata">

### Author: ![Quercus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/quercus/32/528795_2.png) [@Quercus](https://meta.discourse.org/u/Quercus)
#### Post date: [November 7, 2025, 7:04pm UTC](https://meta.discourse.org/t/on-some-forums-nan-instead-of-a-number-on-badge-pages/387842/9 "2025-11-07T19:04:56Z")

</div>

Thanks for the fix, Discourse Team.

---

<div class="post-metadata">

### Author: ![Moin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moin/32/554653_2.png) [@Moin](https://meta.discourse.org/u/Moin)
#### Post date: [November 7, 2025, 9:41pm UTC](https://meta.discourse.org/t/on-some-forums-nan-instead-of-a-number-on-badge-pages/387842/10 "2025-11-07T21:41:10Z")

</div>

Thanks for the quick fix.

Would at least one [@team](https://meta.discourse.org/groups/team) member like the first post? I think Quercus deserves the badge.

---

<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: [November 10, 2025, 5:02am UTC](https://meta.discourse.org/t/on-some-forums-nan-instead-of-a-number-on-badge-pages/387842/11 "2025-11-10T05:02:22Z")

</div>


