It's happening to me with the book module.
I have created a group named 'nobody' (no role assigned).
Then I create a book page and I do not select the group 'nobody'. Saves ok.
Then I try to edit that book page and when I press 'preview' I get the message "Illegal choice in .".
When updating the page, if I check 'nobody', the book page is saved ok, but is obviously not what I need.
I think there are 2 problems here.
1) Probable the forms api should be telling me which field is "illegal".
2) Maybe the way the default values are built here could be changed so it works ok.
It is strange that I was able to create the book page, but I can't update it.
Comments
Comment #1
markus_petrux commentedI believe I've found the solution. In the edit page (of a node) when no simple_access group was checked, gid for that node in 0. In this case the default_values of the form should not be set.
Please, see attached patch. Oh, it also set $weight = 0; as default value when creating groups.
Comment #2
chrisd commentedI think I had this problem.
I looks like the nodes that existed before "Simple Access" was installed could not be updated (Error "Illegal choice in .").
The work around for me, was to pick a "Only viewable by" role, save, reedit and then remove the that role.
I installed your patch and it looks like the pre-"Simple Access install" node now can be updates without doing the previous trick.
Should we update the package ?
Thanks markus_petrux,
Christophe D.
Comment #3
markus_petrux commentedI've been using that patch with no problems. :-)
I believe I forgot to flag the issue for code review. :-?
Comment #4
Tobias Maier commentedthank you very much for your patch it works as expected
I set it to rtbc and hope jjeff would commit it soon :)
cu tobi
Comment #5
Tobias Maier commentedhttp://drupal.org/cvs?commit=26680
Comment #6
jjeff commentedMy apologies for not getting to this sooner. The patch has been applied to the 4.7 and CVS versions Simple Access.
Still working on 4.6...
Comment #7
tayknight commentedThanks, markus. I was pulling my hair out :)
Comment #8
(not verified) commented