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.
AI-generated summary
Users are discussing an issue where subcategories suddenly disappeared from the dropdown when publishing posts via the WordPress Discourse plugin. davidkingham reported the problem despite having “Display Subcategories” enabled, suggesting a possible regression. angus initially confirmed the feature worked in their test setup, guiding davidkingham through steps including forcing a category update. david speculated it might relate to the experimental ‘category scaling’ mode. angus reproduced the issue by enabling the Discourse site setting “lazy load categories groups” for admins — which hides subcategories in WordPress. davidkingham confirmed having that setting enabled, but disabling it alone didn’t fix the issue. angus advised clearing caches by updating a category in Discourse and forcing a category update in WordPress. Following these steps, davidkingham confirmed the fix worked. The root cause was the “lazy load categories groups” setting combined with stale caches, resolved by cache invalidation and forcing a category sync.
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 is connected to demo.pavilion.tech).
-
Created a new sub-category: Eclipses - Pavilion's Demo Community
-
Turned on “Display Subcategories” in WP Discourse Publishing settings.
-
Forced a category update in WP Discourse by checking “Force Category Update”.
-
The eclipse sub-category appeared in the category list in WP Discourse.
-
Publishing to the eclipse category worked as expected.
Could you walk me through some similar steps reproducing the issue?
I wonder if this is related to the experimental ‘category scaling’ mode? Maybe worth trying? (@davidkingham do you have that enabled?)
Yes, I’ve reproduced the issue as follows:
-
Set the Discourse site setting “lazy load categories groups” to “admins”.
-
Perform steps 1 to 3 (above).
-
Subcategories do not appear in WP Discourse.
@davidkingham could confirm whether you’re using the “lazy load categories groups” site setting?
Thanks guys, yes I had it set to admins, disabling it does not bring the subcategories back.
You may need to also invalidate your WP Discourse and / or Discourse caches.
- Update the details of a category in Discourse.
- Select “Force Category Update” in the WP Discourse Publishing settings and “Save Options”.
That did the trick, thank you Angus!