SUMMARY

In views using aggregation, if you

  • add exposed filter on text filed,
  • add few exposed values
  • deselect Optional
  • select Remeber

you will get the following error:

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

HOW TO RECREATE

Create content type product:

  • Title & Body
  • Price: float
  • Destination: text field

Create a view to display products

  • Set Use Aggregation to yes
  • Add destination filter, expose it, Filter type to expose: Grouped filter
  • Unselect: Optional
  • Select: Remeber
  • Add 3 values (Brisbane, Sydney, Melbourne for example) with the same values and select one of them
  • Save the view
  • Go to views page and select anything
  • Reload the page without get parameters and you will see the error

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

Comments

DunnLofts’s picture

Hi Vladimir,
Have you been able to get a soultion. I have exactly the same issue.

Adam

mondrake’s picture

daniel.rolls@flightcentre.com.au’s picture

I have checked out #1177882 myself for a similar issue, and the patches in there don't seem to apply.

I think this problem is related to a bug with exposed multiple filters rendered as checkboxes.
See also:
https://drupal.org/node/1982936

drikc’s picture

Issue summary: View changes

The path #64 in #1177882-64: Exposed filters fire "An illegal choice has been detected. Please contact the site administrator." error did successfully solved the following issue I've encountered:

Context

Exposed filters using options:
- Grouped filters
- Remember

Symptoms

Upon a page load, after having previously and successfully used that culprit exposed filter, the following issues appear:
- The filter condition is lost
- The view is empty
- "An illegal choice has been detected" message is set for the culprit exposed grouped filters input