after trying to add a new sub category to my Discourse instance, I’ve noticed the following error:
My intention was, to make this category only available for admins. Instead of “admins”, a user group called “undefined” was added and I’ve got this error message. In case of making this category available for everyone, everything works fines.
I can repro this error on Try. Attempting to change the security permissions (even if reverting them back to everyone) causes the 500 error. Nothing in site logs either.
1. Navigate to `/categories`
2. Click "New Category"
3. Provide a category name
4. Switch to Security tab
5. Click "Edit Permissions"
6. Delete "`everyone` can... Create / Reply / See"
7. Select "admins" from dropdown and click "Add Permission"
8. Note that after adding "admins" is not displayed but "undefined"
9. Click "New Category"
10. Get 500 Error
Someone else can repro with this ? or has a better repro?
Ok after discussion with @tgxworld there was indeed two issues, a bug in select-box and a very specific behavior of this combo box (removing content of the array when an item is selected). So my commit was mostly fixing the second issue and not the first.
This commit should be more appropriate thx @tgxworld: