# Tag Counts Missing on Tags Page

**URL:** https://meta.discourse.org/t/tag-counts-missing-on-tags-page/307563
**Category:** Support
**Tags:** tags
**Created:** [May 10, 2024, 4:45pm UTC](https://meta.discourse.org/t/tag-counts-missing-on-tags-page/307563 "2024-05-10T16:45:10Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![salbertelli](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/salbertelli/32/256625_2.png) [@salbertelli](https://meta.discourse.org/u/salbertelli)
#### Post date: [May 10, 2024, 4:45pm UTC](https://meta.discourse.org/t/tag-counts-missing-on-tags-page/307563/1 "2024-05-10T16:45:10Z")

</div>

I’ve recently observed that the tag counts (e.g., “Java X 10”) are no longer visible on our /tags page. Instead, we only see a list of tags _without_ their respective counts.

Any insights on what might be causing this sudden disappearance of counts would be greatly appreciated. Thank you!

---

<div class="post-metadata">

### Author: ![jericson](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jericson/32/116215_2.png) [@jericson](https://meta.discourse.org/u/jericson)
#### Post date: [May 10, 2024, 6:13pm UTC](https://meta.discourse.org/t/tag-counts-missing-on-tags-page/307563/2 "2024-05-10T18:13:15Z")

</div>

My guess would be you have theme that removes it. I don’t see the problem [on Meta](https://meta.discourse.org/tags) or any of the sites I regularly use.

---

<div class="post-metadata">

### Author: ![JammyDodger](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jammydodger/32/254611_2.png) [@JammyDodger](https://meta.discourse.org/u/JammyDodger)
#### Post date: [May 10, 2024, 6:16pm UTC](https://meta.discourse.org/t/tag-counts-missing-on-tags-page/307563/3 "2024-05-10T18:16:43Z")

</div>

If you have a chunk of private categories it could be the `include secure categories in tag counts` admin setting?

---

<div class="post-metadata">

### Author: ![salbertelli](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/salbertelli/32/256625_2.png) [@salbertelli](https://meta.discourse.org/u/salbertelli)
#### Post date: [May 10, 2024, 6:32pm UTC](https://meta.discourse.org/t/tag-counts-missing-on-tags-page/307563/4 "2024-05-10T18:32:40Z")

</div>

Hi Jon, Thank you for your reply. Unfortunately, I haven’t introduced any new themes.

---

<div class="post-metadata">

### Author: ![salbertelli](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/salbertelli/32/256625_2.png) [@salbertelli](https://meta.discourse.org/u/salbertelli)
#### Post date: [May 10, 2024, 6:34pm UTC](https://meta.discourse.org/t/tag-counts-missing-on-tags-page/307563/5 "2024-05-10T18:34:10Z")

</div>

Hi JammyDodger! I do have a chunk of private categories. I will have a look at that setting. Ty!

---

<div class="post-metadata">

### Author: ![salbertelli](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/salbertelli/32/256625_2.png) [@salbertelli](https://meta.discourse.org/u/salbertelli)
#### Post date: [May 10, 2024, 6:47pm UTC](https://meta.discourse.org/t/tag-counts-missing-on-tags-page/307563/6 "2024-05-10T18:47:28Z")

</div>

The ‘include secure categories in tag counts` admin setting was disabled. I enabled it, but unfortunately no luck in showing the tag counts.  
Strange.

---

<div class="post-metadata">

### Author: ![Arkshine](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/arkshine/32/298682_2.png) [@Arkshine](https://meta.discourse.org/u/Arkshine)
#### Post date: [May 10, 2024, 7:18pm UTC](https://meta.discourse.org/t/tag-counts-missing-on-tags-page/307563/7 "2024-05-10T19:18:48Z")

</div>

> **I tried to debug the issue. Here is what I figured out.**
>
> I found the site on another topic and checked it without plugins/themes, but the issue still happens.
> 
> What is odd is the count in the API.
> 
> ![image](https://global.discourse-cdn.com/meta/original/4X/b/4/b/b4b37dff6d47c335233eb98beb31af59c42d5048.png)
> 
> Looking at the source code:
> 
> [discourse/app/assets/javascripts/discourse/app/templates/components/tag-list.hbs at v3.0.6 · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/v3.0.6/app/assets/javascripts/discourse/app/templates/components/tag-list.hbs#L22-L26)
> 
> ![image](https://global.discourse-cdn.com/meta/original/4X/9/f/f/9ffc46727e8b06e8575c848f65dfd72e2542b82f.png)
> 
> I tried to debug to see, and the `count` is well passed. It is; no problem here.
> 
> However, we can see the `pmCount` is `undefined`. This is likely the issue because the `totalCount` has a `NaN` (_Not A Number_) value now, which is why the condition in the template is ignoring it.
> 
> ![image](https://global.discourse-cdn.com/meta/original/4X/2/1/0/210d99523366486eae294b94fce8d6a0a07c6eb5.png)
> 
> Looking at the GIT history, this function has been fixed in this PR where you can see `pmCount` is being checked before adding the two numbers.  
> [SECURITY: Hide PM count for tags by default (#20061) · discourse/discourse@f31f0b7 · GitHub](https://github.com/discourse/discourse/commit/f31f0b70f82c43d93220ce6fc0d4f57440452f37)
> 
> ![image](https://global.discourse-cdn.com/meta/original/4X/7/d/6/7d685b2f379194e155c4e465c3e367dfb8c969ae.png)
> 
> This fix is available since `3.1.0`.  
> Searching your [Discourse version](https://meta.discourse.org/t/find-what-version-of-discourse-youre-using/104326) gives me you’re using an old stable version 3.0.6
> 
> ![image](https://global.discourse-cdn.com/meta/original/4X/b/2/c/b2cc3c154a1cec5eb91906f986681fd55e42196c.png)

Short version:

You’re using Discourse 3.0.6, and a fix landed in 3.1.0, which fixed indirectly this issue. 🤔  
You can probably fix your issue by updating to the latest stable version, which is 3.2.0 or, at the very least, 3.1.0.

---

<div class="post-metadata">

### Author: ![salbertelli](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/salbertelli/32/256625_2.png) [@salbertelli](https://meta.discourse.org/u/salbertelli)
#### Post date: [May 10, 2024, 7:37pm UTC](https://meta.discourse.org/t/tag-counts-missing-on-tags-page/307563/8 "2024-05-10T19:37:19Z")

</div>

Fantastic! Many thanks, [Arkshine](https://meta.discourse.org/t/tag-counts-missing-on-tags-page/307563/7)! I appreciate your time, and superb debugging skills are greatly valued in pinpointing the root cause.

I will follow up with our server admin regarding the upgrade.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [June 26, 2024, 6:02pm UTC](https://meta.discourse.org/t/tag-counts-missing-on-tags-page/307563/9 "2024-06-26T18:02:18Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
