Parent category counter

My site: www.sqrpgz.com

My issue: category drop-down menu shows parent categories with post/topic counts, but in the case of that parent category having sub-categories, the total posts/topics aren’t added to reflect the parent category’s total count. See images:

you can see that the parent “FE Open Exchange” has a zero count in the first image, but if selected, and sub-categories are viewed in the subcat drop-down menu, you can see that “FE Open Exchange” should show an accumulated total greater than zero. Showing zero confuses my users – they think it’s not worth clicking on the parent in such a case.

My question: can anyone tell me how to show the parent count equal to all subcategory counts added?

anyone have an idea? do i just need to kill the subcategories?

@sam do you have any idea why the parent category counter includes all subcategory counts on the “categories” page, but not in the category drop-down menu? How can this be fixed?

Are you sure this isn’t related to your theme?
I’m using graceful theme by @awesomerobot and for me, the view is like this:
Screenshot%20from%202018-08-17%2021-19-02
This remains consistent with default theme as well.

2 Likes

thanks @itsbhanusharma, but the category counts are working fine until i add sub/child categories – then the child categories are fine, but the parents are set to zero. i actually converted back to a default theme to double-check, but it’s still an issue. i was hoping someone would enlighten me as to either why, or even better, explain how i can change/fix it.

So I’m trying to reproduce your symptoms!
in Your case, Counts are okay on a category but as soon as you add a sub category to it, the count changes to zero! right? or am I missing something here?

If what I described above is true then sorry but I can’t repro that behavior on latest so it’d be much better to have either a specific version number or better yet, try upgrading to latest by visiting /admin/upgrade on your forum and then see if it still persists.

Another way to test would be to visit the safe mode and disabling all plugins and customization this can be done by appending /safe-mode to your forum link.

EDIT: I may be wrong but I visited your forum and found out that it is running version 2.0.3 (Are you on stable channel?) whereas most of the installs that I could test upon are on latest tests-passed (v2.1.0beta4) so maybe it had been fixed?

Thanks for the feedback! I just tried the /safe-mode option, and it still happens, so it must be a version-related issue. I’m using discoursehosting.net for hosting – they offer a stable version, and I’m not sure I can upgrade. Nonetheless, thank you for your help!

That is not entirely correct.
It does not “change to zero” , it only counts the topics in the subcategories, in this specific case there are no topics that are directly in the category itself.

I can reproduce this on stable, but indeed I’m not able to reproduce on tests-passed.

1 Like

Thanks for the clarification. So, it looks like this has been solved in the tests-passed. Good to know.

Maybe you can contact discoursehosting and ask them to move you to the tests-passed channel?