I managed to figure out how to solve this, but thought it was worth reporting.
I attempted to assign a parent category, cat-B, to cat-A which already had 3 subcategories in it. The Discourse system gave me an error message and said something like ‘we can’t move subcategories’. So I’m guessing there’s a limit to how many categories can be nested within each other.
I concluded that’s fine, I’ll just reassign the parent category for the 3 subcategories first. But when I tried to do that, I got an exception error like this.
The console gives a 404 error for the URL ending in c/cat-B/cat-A/subcategory/edit/find_by_slug.json
A similar error shows up for the other 2 subcategories of cat-A.
What it should show instead is c/cat-A/subcategory/edit without the cat-B. So I manually typed the URL with this format and got to the normal category settings page as expected. I was able to fix all 3 subcategories and cat-A in this way.
This is probably just a small bug that would be worth fixing in the future
Do you know what version of Discourse your site is using? If your site is self-hosted, you can find the version near the top of the site’s admin dashboard. The reason I am asking is because I think Discourse should have prevented you from adding the parent category. When I try to do it, I get the following error:
It is possible that you are running into a bug that has been fixed in a more recent version of Discourse. It is also possible that I am not reproducing the issue correctly.
Aaaannnd after writing all that, the error magically healed itself without me having to use the manually-type-in-the-URL workaround. Seems like it’s all good now folks.