# Subcategories suddenly missing

**URL:** https://meta.discourse.org/t/subcategories-suddenly-missing/303912
**Category:** WordPress
**Tags:** lazy-load-categories
**Created:** [April 15, 2024, 3:32pm UTC](https://meta.discourse.org/t/subcategories-suddenly-missing/303912 "2024-04-15T15:32:54Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [April 15, 2024, 3:32pm UTC](https://meta.discourse.org/t/subcategories-suddenly-missing/303912/1 "2024-04-15T15:32:55Z")

</div>

I used to be able to see the subcategories when publishing a post to Discourse, now I can only see top level categories in the dropdown. I do have the option checked for displaying subcategories in the WP plugin so there seems to be a regression here.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [April 16, 2024, 9:00am UTC](https://meta.discourse.org/t/subcategories-suddenly-missing/303912/3 "2024-04-16T09:00:14Z")

</div>

Hey David, I just tested this out and it’s working for me. Here’s what I did with my test setup ([wp-discourse.pavilion.tech](https://wp-discourse.pavilion.tech) is connected to [demo.pavilion.tech](https://demo.pavilion.tech)).

1. Created a new sub-category: [Eclipses - Pavilion's Demo Community](https://demo.pavilion.tech/c/astronomical-events/eclipses/10)

2. Turned on “Display Subcategories” in [WP Discourse](https://github.com/discourse/wp-discourse) Publishing settings.

3. Forced a category update in [WP Discourse](https://github.com/discourse/wp-discourse) by checking “Force Category Update”.

4. The eclipse sub-category appeared in the category list in [WP Discourse](https://github.com/discourse/wp-discourse).

5. Publishing to the eclipse category worked as expected.

Could you walk me through some similar steps reproducing the issue?

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [April 16, 2024, 9:02am UTC](https://meta.discourse.org/t/subcategories-suddenly-missing/303912/4 "2024-04-16T09:02:48Z")

</div>

I wonder if this is related to the experimental ‘category scaling’ mode? Maybe worth trying? (@davidkingham do you have that enabled?)

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [April 16, 2024, 9:57am UTC](https://meta.discourse.org/t/subcategories-suddenly-missing/303912/5 "2024-04-16T09:57:09Z")

</div>

Yes, I’ve reproduced the issue as follows:

1. Set the Discourse site setting “lazy load categories groups” to “admins”.

2. Perform steps 1 to 3 (above).

3. Subcategories do not appear in [WP Discourse](https://github.com/discourse/wp-discourse).

@davidkingham could confirm whether you’re using the “lazy load categories groups” site setting?

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [April 16, 2024, 1:41pm UTC](https://meta.discourse.org/t/subcategories-suddenly-missing/303912/6 "2024-04-16T13:41:05Z")

</div>

Thanks guys, yes I had it set to admins, disabling it does not bring the subcategories back.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [April 16, 2024, 2:43pm UTC](https://meta.discourse.org/t/subcategories-suddenly-missing/303912/7 "2024-04-16T14:43:50Z")

</div>

You may need to also invalidate your [WP Discourse](https://github.com/discourse/wp-discourse) and / or Discourse caches.

1. Update the details of a category in Discourse.
2. Select “Force Category Update” in the [WP Discourse](https://github.com/discourse/wp-discourse) Publishing settings and “Save Options”.

---

<div class="post-metadata">

### Author: ![davidkingham](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/davidkingham/32/119528_2.png) [@davidkingham](https://meta.discourse.org/u/davidkingham)
#### Post date: [April 16, 2024, 3:03pm UTC](https://meta.discourse.org/t/subcategories-suddenly-missing/303912/8 "2024-04-16T15:03:02Z")

</div>

That did the trick, thank you Angus!
