Hi

I have 2 roles that a new user can choose when they create their account. For the most part it works as expected, but if the user does not select the role, the form fails to validate with the error message:
"An illegal choice has been detected. Please contact the site administrator."

There is also a corresponding error message in watchdog.
Is it possible to have a nicer error message to guide the user to the correct form element to fix?

Thank you
ice70

Comments

anzi31’s picture

Added two roles that a new user can choose from when they create their account.
Was able to create accounts without selecting any role.
Could not duplicate error.

amitgoyal’s picture

Status: Active » Postponed (maintainer needs more info)

I also tried this but couldn't reproduce the problem. Please provide more information so that we can reproduce this issue.

ice70’s picture

Hi,

thank you for trying.

My settings are as follows:
[User choice] admin/config/people/autoassignrole/user

User role assignment: Enabled
Roles: 2 custom created roles
User role selection: Single role
Selection method: Radio Buttons/Checkboxes
Required: yes [this should prevent 'Was able to create accounts without selecting any role.'?]
sorting: ascending

I will have a go with a frech install of drupal and nothing else to see if there is something in my site setup that may be the cause of this.

thank you

anzi31’s picture

Applied your settings and did not get the error.
The only message I got was that Role was required which was expected since it was set up that way.

mike.davis’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)