Can't change topic sub-categories of the same name

(Brad Huber) #1

We have a forum related to multiple theme park resorts, where each one has its own category. Each category has similar sub-categories like “Hotels” or “Tickets”.

The bug comes in when a Topic was created under Theme Park A - Hotels, and should be under Theme Park B - Hotels. However, when using the in-place ajax editor for the category and title, selecting the themepark B related subcategory for “Hotels” doesnt update the category.

It looks like the issue is that subcategories arent listed by id, but rather by name, and dont carry any info about parent category? The form submission data looks like:

title:Suggestion to get to Contemporary from Art of Animation at 9:30 am?
category:Hotels and Lodging

regardless of which “Hotels and Lodging” sub-category is chosen. Is there a way to make the form submit categories by id, rather than name? Or should we find some way to not have duplicate sub-category names (which seems like it would be a normal use case)?

(Sam Saffron) #2

Having trouble reproducing this, can you confirm you are on latest? Also screen shots of what you are doing would be helpful.

(Brad Huber) #3

I’m on instead of, so I’ll update later tonight when it’s slower and report back either way. If its still not working, I’ll provide screenshots. Thanks!

(Brad Huber) #4

After updating, we’re still having the issue.

Here’s an imgur gallery detailing whats going on: Discourse SubCategory Issue - Album on Imgur

(Robin Ward) #5

I was able to reproduce and fix this. It was indeed code using the name instead of id after we removed the restriction that subcategories could have the same names. If you update to the latest you should be off to the races.

In main category page, subcategories with same name show same new topic count
(Brad Huber) #6

Sweet! Thanks a bunch!

(Jeff Atwood) #7