Subcategory filter disappears on /none

AI-generated summary

A bug has been reported where the subcategory filter intermittently disappears on the /none page when the default list filter is set to “no subcategories”. pHneutre explains that this behavior is non-deterministic — the filter is often missing on first access, making subcategories invisible until the page is refreshed or navigated differently. They suspect the filter doesn’t cause the issue but reveals an underlying problem. sam acknowledges the detailed report and invites community contributions with pr-welcome. yuriy confirms the diagnosis, noting the filter’s disappearance stems from multiple factors, and points to a GitHub PR for more details and fixes. The issue impacts member experience and relates to category filtering logic.

The default list filter category setting, added following this topic: In a top category page, show only its own topics below subcategories - #29 by sam, causes a nondeterminist behavior as far as I understand.

It seems that setting it to “no subcategories” redirects the base category URL to the /none category URL. But sometimes this page displays the “subcategory” filter, sometimes it does not. Especially, the first time a category is clicked, this filter isn’t displayed. Hence, subcategories are nowhere to be found, completely invisible. Then, if I refresh the page, the filter reappears.

It is plausible that the filter doesn’t cause the issue but rather just reveals it, because before this filter, the only way to access /none was to open the subcategory filter so it was already displayed and we never knew that sometimes it wouldn’t be displayed. If that makes sense.

Steps to reproduce

  • In a category, set the default list filter category setting to “no subcategories” and save
  • Access said category through any regular means, e.g. link in the menu
  • Subcategory filter isn’t displayed
  • Refresh, it is now displayed
1 Like

Thanks for the detailed report, going to put pr-welcome on this in case someone from the community wants to try out a fix here.

2 Likes

You guessed it right. The filter disappeared due to a number of reasons, which in essence were failures to pass along correct category data, and track the changes properly in the UI.

For more details on the applied fix, you can check FIX: subcategory filter should be always visible on category view page by yuriyaran · Pull Request #36050 · discourse/discourse · GitHub.

3 Likes