Sub Categories are listed in Parent Category dropdown

When you go to create a new category inside of the Parent Category dropdown it is including the Sub Categories. Sub Categories shouldn’t be in this list because you can’t have a Sub Category be a Parent Category. Good news is if you do select a Sub Category and press the “New Category” button it does show a red warning at the top that this can’t be done.

I’m in the middle of working on a fix for this bug and will hopefully be able to finish it up later tonight/tomorrow.

The parentCategories filter on the Categories Model appears to be working as intended, but I think the issue has to do with the fact that the parentCategories aren’t actually being passed into the category-chooser module but instead being picked up by the observer which doesn’t have the filter.

5 Likes

Sure, @techapj can you add this to your list?

1 Like

Fixed via:

https://github.com/discourse/discourse/commit/0ede6b5ed6791c1dad92d9f57d1b11c2b0300e04

5 Likes