An illegal choice has been detected. Please contact the site administrator.
| Project: | Publish Content |
| Version: | 6.x-1.1 |
| Component: | Miscellaneous |
| Category: | bug report |
| Priority: | normal |
| Assigned: | aaronbauman |
| Status: | needs review |
when assigning the publish/unpublish permissions i received the following error:
An illegal choice has been detected. Please contact the site administrator.
when i looked at the module code i found that sometimes the permissions have spaces in front of them:
$perms[] = ' publish '. check_plain($type->type) .' content';
$perms[] = ' publish own '. check_plain($type->type) .' content';
$perms[] = 'unpublish '. check_plain($type->type) .' content';
$perms[] = 'unpublish own '. check_plain($type->type) .' content';
when i removed the spaces everywhere everything was working again without the error
our webserver is protected by the suhosin layer (http://www.hardened-php.net/suhosin/) so perhaps that module strips the post variables after the submit

#1
+1
#2
There are more instances of leading spaces than documented above.
here's a patch.