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

8 posts / 0 new
Last post
haris
haris's picture
"An illegal choice has been detected. Please contact the site administrator."

Hello guys!

I have a problem with the browse cars page. To be more exact,when a user clicks on the next page button or changes page number in any way, without changing any search parameters, there is a red alert message on the top of the page, saying "An illegal choice has been detected. Please contact the site administrator." .

Im having this problem since i installed the car dealer theme and i still havent figured it out. Id really ask for some assistance since the website is working as its supposed to, except the annoying message on the top.

I tried using both recommended and dev version of exposed filters, neither resolved the problem. I also tried appling patch on #58 from this issue https://drupal.org/node/1177882 but it also did not help.

support
support's picture
Hi there Haris:

Hi there Haris:

It is an issue that hasnt been solved yet in the module. Please, roll back to the previous version of BEF included on the package of CarDealer you have originally downloaded from e-junkie when you bought the theme.

Just update it on the modules folder.

Bests!

haris
haris's picture
That helped but drupal system

That helped but drupal system is now reporting that urgent security update is necessary for better exposed filter module so thats not really a great way to fix it.

I know that the error has to do something with exposed filters sorting options but cant figure out why, any pointers?

mark.lindley
mark.lindley's picture
I have the same problem

I have the same issues... Can they be fixed as it is not the module that is causing the problem ...

Thanks

mark.lindley
mark.lindley's picture
Module is still out of date

Hi,

Please can you tell me when there will be a fix for the BEF module. It still has a security risk and cannot be updated.

I have tested the update and this is what is causing the error:

The BEF module below causing the error is not generating the correct URL, the word created is missing?

BEF module shipped with theme working but security risk
http://www.tradecarsspain.com/cars-browser?make=All&body-style=All&fuel-...

BEF module updated causing error.
http://www.tradecarsspain.com/cars-browser?make=All&body-style=All&fuel-...

Thanks

Mark

reisquarteu
reisquarteu's picture
The problem may be in Views

Hi, Mark.

I had the same problem as yours at http://www.tradecarsspain.com/cars-browser?make=All&body-style=All&fuel-....

I googled a little and found that comment #86 at https://www.drupal.org/node/1177882#comment-9980503 helped me. It seems to be a bug in the Views module itself.

Please give it a try and let us know if it works for you too.

Best regards! :)
Reis

support
support's picture
Hi Mark:

Hi Mark:

I gess I´ll have to work on it. I´ll include it in the next theme release so you can just download it and extract the BEF module. I´ll update this post once I do it.

Best!!

graeme
graeme's picture
Best of both worlds?

I had the same problem.
However I had already made significant changes to the site before I noticed the problem, so reverting to the backup I made before updating the BEF module was not really an option for me.
So I did a bit of digging around, and I found the following lines in the originally installed version of sites/all/modules/better-exposed-filters/better-exposed-filters-exposed-form-plugin.inc.

/* Car Dealer Fix */
if (isset($this->options['bef']['sort'])) {
$form['sort_by']['#default_value'] = 'created';
}

If you add these lines back in to the upgraded version of the BEF module (currently 7.x-3.0-beta4), it will fix the problem.
They go just before the section that starts with the comment:
/*
* Handle exposed pager elements
*/
which in 7.x-3.0-beta4 is on line 839.

This gets rid of the Drupal security warning about needing to update the BEF module, and still provides the bug workaround for the interaction with the pager.

Log in to post comments