Move Topic dialog does not show all (Sub)Categories
-
I have a (sub)category "Softare" and various (sub)categories for different "Products" in there.
Now I wanted to move a topic from one "Product" category to another and there I realized that only the first ten in the move dialog are showing as the "Subcategories per page" setting was set to ten.Changing this fixed it, but I don not want that all of them get listed on the main page and that's why I actually limited it. So not sure if this is intended bevaviour or if this is still an issue, probably I am just using the subcategory per page setting wrong, but imho it should always show me all categories in the move dialog.
-
Actually it's by design, the subcategories per page setting controls a few things like the amount of sub categories shown on /categories, /category/1/slug and the category search dropdown. This setting was added for forums with hundreds of subcategories to prevent the page loads getting out of hand. Imagine opening the dropdown and you have 1000 entries under one category.
See this thread for a solution https://community.nodebb.org/topic/17044/all-categories-has-limit.
If you don't have alot of subcategories you can increase that value and hide the subcategories on the home page with the css on the linked topic.
I am not sure if we should another category setting separate from "sub categories per page" to control how many categories are displayed on /categories page.
-
@schajuli if you don't mind editing the source you can change this line https://github.com/NodeBB/NodeBB/blob/master/src/socket.io/categories/search.js#L88 to
resultCids.push(...childCids.slice(0, 100));
Then the search dropdowns in places like move topic will display 100 categories max.