Hi,

I tired using Views Hacks Views Filter Selective Drupal 7 its very close to what I need but needs 2 changes:

1. Taxonomy filters should be filtered when you first enter view. Now they are showing all options ignoring the view content.
2. "Any" option should be present when one of the filters is selected now it shows legal options but if you have more then 1 filter then you get "An illegal choice has been detected. Please contact the site administrator."

Are there any plans of fixing this ? So far I'm late with my project about 1 month. Things are getting uggly :)

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim’s picture

Title: Views Hacks Views Filter Selective Drupal 7 » filters should be filtered when you first enter view
Status: Active » Needs review
FileSize
8.3 KB

Here's a patch for the first point.

Note that it's cumulative on #1358152: skip processing of non-exposed filters.

> 2. "Any" option should be present when one of the filters is selected now it shows legal options but if you have more then 1 filter then you get "An illegal choice has been detected. Please contact the site administrator."

I can't reproduce that. Could you file a separate bug for it please?

emicoma’s picture

Hi,

It works (with your 2 patch applied) , but 2 problems :
after the first run of the view, if "any" selected again : error "illegal choice"
and no way to make it works with better exposed enabled same time : error "illegal choice" again.
any idea ?

emicoma’s picture

hi,
I deleted those lines (around lines 127-135) :

 if (!$this->exposed_filter_applied()) {
          $any_label = variable_get('views_exposed_filter_any_label', 'new_any') == 'old_any' ? t('<Any>') : t('- Any -');
      $filter_element['#options'] = array('All' => $any_label) + $filter_element['#options'];
       $filter_element['#default_value'] = 'All';
       }

and everything works fine now, with better exposed filters enabled too.
I have checkbox, select all link working without error "illegal choices" anymore.
thanks for your work.

briand44’s picture

The patch fixes the problem when first entering the view but I am having the same problem when choosing the "any option." I get the error "An illegal choice has been detected." I'm not using better exposed filters. Any ideas?

pradbone’s picture

I'm trying to get this working too.

it's OK with one exposed filter, but if you put 2, you get the above error after you have selected the first filter. then if you hit apply again, it works correctly.

pradbone’s picture

Is there no one that can figure this out?

infojunkie’s picture

Issue summary: View changes
Status: Needs review » Closed (won't fix)

This module has been deprecated in favour of https://drupal.org/project/views_selective_filters. Please test there and reopen if necessary.