An illegal choice has been detected - during Permissions setting

lambertnet - July 15, 2008 - 12:52
Project:Contact attach
Version:5.x-1.1
Component:User interface
Category:bug report
Priority:normal
Assigned:Unassigned
Status:postponed (maintainer needs more info)
Description

I installed this module on a Drupal 6.3 site - no problems were encountered when enabling permissions for access to a site-wide contact form, but this error was encountered when trying to enable permissions for a user contact form. If I select it for multiple roles the error appears multiple times.

Any ideas?

#1

oadaeh - July 17, 2008 - 16:40

I'm not seeing that behavior. Which core and contrib modules do you have installed and enabled?

#2

duckjerk - August 12, 2008 - 23:46
Version:6.x-1.x-dev» 5.x-1.1

I am having this same problem except with 5.x-1.1. I have attached a list of installed and enabled modules.

This is from watchdog

Type form
Date Tuesday, August 12, 2008 - 6:22pm
Location http://epiphanycatholic.org/admin/user/access/1
Referrer http://epiphanycatholic.org/admin/user/access/1
Message Illegal choice send attachments with users\' contact form in 1 element.
Severity error
Hostname

AttachmentSize
modules.pdf 220.09 KB

#3

oadaeh - August 25, 2008 - 00:04

Okay. I'm not entirely sure if I fixed it or not, but I'm going with the assumption that the apostrophe in the permission text is what is causing it. I didn't go through the list of modules and check them out, but there didn't seem to be a whole lot that might be interfering. Maybe the Node access by role modules might be, but those were the only ones that looked like they might be at all causing interference. I've committed changes to HEAD, DRUPAL-6 and DRUPAL-5. Please download the appropriate -dev version (after it's been updated) and let me know if that fixes your problem or not.

#4

duckjerk - August 25, 2008 - 18:34

That fixed the illegal choice problem and I can now select annonymous users to be able to send attatchments via users contact forms, however when I am annonymous I cannot see the upload fields.

#5

oadaeh - August 25, 2008 - 20:23

Oops! I changed the permission, but forgot to use it. Sorry about that. I've fixed it in HEAD, DRUPAL-6 and DRUPAL-5. Please check out the relevant -dev release when it becomes available. I'm glad that my hunch was correct. As the behavior was not happening on my PC, I wasn't sure it was going to work.

#6

duckjerk - August 27, 2008 - 18:37

Alright everything is working perfectly except for one new issue. Now when people send emails using the contact form everything is lost from the email except the message instead of saying who send it in the message it says

"(http://epiphanycatholic.org/user/0) has sent you a message via your
contact form (http://epiphanycatholic.org/user/14/contact) at Epiphany of
the Lord Catholic Church."

it used to say for instance Dan(dan@email.com) has sent you a message via your contact form...

#7

oadaeh - August 31, 2008 - 04:01

Again, I'm not seeing that behavior. My tests show the user's name. Are the parenthesis there as well, because I don't have them in my messages in either location?

Edit: Oh, and I get everything (body, attachment, etc.) in the e-mail I receive.

#8

duckjerk - September 2, 2008 - 13:58

Yes the parenthesis are there. I disabled the module and the emails are working fine, see all of our users are anonymous when the module is added when they get the email they can't see who sent them the email to reply back.

Normally in the email it grabs the name field and the email field but with the module it just puts it that an anonymous user sent it so they don't know who. I hope you understand what I am saying because it is hard to explain. Try it with anonymous and see what it shows for who sent you it.

#9

oadaeh - September 5, 2008 - 00:03
Status:active» postponed (maintainer needs more info)

Try as I might, I could not reproduce that behavior. I even went so far as to create a brand new test installation and include as few modules as possible. Everything worked as expected every time. I then added both the SMTP Authentication Support and Mime Mail modules, but neither one changed the outcome. Also, I did not have those parenthesis show up at any time during any test. I'm guessing either your theme or another module is interfering and helping create your problem.

Does the problem also go away when you disable the Mime Mail module? If so, then try it with Mime Mail and Contact attach installed as normal, but with Garland or Bluemarine as your theme. If not, then I don't know what's going on there, and I'm going to need more information before I can do anything more.

#10

duckjerk - September 6, 2008 - 20:43

I have the Mime Mail turned off and the contact attach on, and using the garland theme and it still does the same. I will continue to troubleshoot on my end.

 
 

Drupal is a registered trademark of Dries Buytaert.