Creating a new category – Issue to set up (admin only) privileges

(Markus) #1

Hello friends,

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.

Any clue why this error message occurs?


(Version v1.9.0.beta13 +110)

(Joshua Rosenfeld) #2

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.

(Jeff Atwood) #3

Can you take this @tgxworld?

(Alan Tan) #6

@joffreyjaffeux Can you have a look at this instead? It looks like after switching combo-box to use select-box-kit, the default value is not assigned.

(Joffrey Jaffeux) #7

weird it’s actually one of the screen I always use for testing… checking this

(Joffrey Jaffeux) #8

@jomaxro gave me this repro, but I can’t repro:

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?

(Joffrey Jaffeux) #9

Ok I finally repro-ed it, thanks.

(Joffrey Jaffeux) #10

This should be fixed by:

(Alan Tan) #11

Hmm the fix doesn’t look right.

I think the problem is with the combo-box not having a default value when I don’t make any selections.

Screenshot from 2017-10-30 15-37-05

(Joffrey Jaffeux) #12

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:

(Jeff Atwood) #13

This topic was automatically closed after 40 hours. New replies are no longer allowed.