I installed this module, but whenever I try to set permissions (any kind of permission) I get this error:

An illegal choice has been detected. Please contact the site administrator.

I have no idea what's happenning here, since I followed the instructions in the readme to the letter.

CommentFileSizeAuthor
#6 Picture 4.png28.39 KBalex.k

Comments

mike_r1977’s picture

Needless to say, the permissions do not get set and the vocabularies show up regardless.

dreed47’s picture

More info is needed. Is this a drupal error or a php error or something else? What modules are installed? Does the problem go away when you uninstall the Taxonomy Role module? Is anyone else seeing this behavior?

mike_r1977’s picture

This was a red Drupal error that I got whenever I tried saving permissions. Considering that it prevented me to save permissions for other modules as well (CCK fields, for instance), I disabled the module and the problem went away. I would like to use this module as I really like the functionality, but since I'm on a deadline I don't know if I'll have the time to enable it again and reproduce the error in order to provide you with more details.

ktleow’s picture

I dont think this is a problem related to this module...

I had this problem whenever there's a required field (typically a select list), but you've not selected any..

Hope that helps..

alex.k’s picture

Could be related to the fact that permissions include the full vocabulary name. I see this error, too. Some vocab names look like this: access [Peter's test group] Group Files vocabulary - these come from og_vocab.

alex.k’s picture

StatusFileSize
new28.39 KB

In fact that seems to be the reason, see attached screenshot. Vocabs that do not include square brackets get set, but the two last ones will not remain checked, and cause this error.

pixelpreview@gmail.com’s picture

same problem
when I install this module and check the access for image galery taxonomie ... only this I have the same red warning: an illegal choice ...

this vocabulary is not a manual vocabulary created by the user but a vocabulary created by a module on the install of this module (galery image in image module) That's perhaps the cause of the problem ?

no brackets for me in the name of the vocabulary

when I disabled the module, the warning disappear.

any idea ?

pixelpreview@gmail.com’s picture

yes when i look into the vocabulary's table ... galery image vocabulary is the only with the mention galery_module and the others vocabularies have taxonomy like mention

that's the problem

alex K has the same problem because the vocabulary has created by og module ... and not by the administrator.

iandickson’s picture

I also found that the & is an illegal character in vocab names. Solved by changing to "and".

rank’s picture

For me the same errors appeared when trying to enable permission for any role to the 'what's new' free-tagging vocabulary.

colincalnan’s picture

Component: Code » Miscellaneous

iandickson is correct in #9, it seems like having an ampersand & in your Vocabulary name causes the error. I changed them to 'and' and it worked. Thanks iandickson

Sean-Khan’s picture

I wonder of scandic letters/umlauts (ä, ö) cause this problem too? Or, this module possibly overrides other errors? I'm getting 'Illegal choice' -errors when trying to save a node without all required fields filled, instead of 'you must fill...' -error. I've got a bunch of other modules so I'm not sure if this is the cause of the problem.

monotaga’s picture

This happens with apostrophes in the vocab name, too.

David Lesieur’s picture

Status: Active » Fixed

Fixed. Unfortunately, vocabulary names end up in permission names, which are used directly as HTML id attributes in the permissions page. The patch strips from permission names all those characters that are illegal in id attributes.

David Lesieur’s picture

Title: An illegal choice has been detected. Please contact the site administrator. » Illegal characters in permission names

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.