It seems the documentation for views.module:views_build_view function needs updating. The array form for @param $filters needs to change from array('value'=>'some value') to array('filter'=>'some value'). The actual code that extracts the value (views_query.inc:_views_view_build_filters) now looks only for 'filter'.

views.module:views_build_view:

 * @param $filters
 *   An array of exposed filter ops and values to use with the exposed filter system
 *   Array has the form:
 *     [0] => array('op' => 'foo', 'value' => 'bar'),
 *     [1] => array('value' => 'zoo'), // for a locked operator, e.g.
 *   If no array is passed in, views will look in the $_GET array for potential filters
*/

vice views_query.inc:_views_view_build_filters function :

        if ($expose['optional']) {
          if ((!isset($exposed_filter_values[$count]['filter']) || $exposed_filter_values[$count]['filter'] == '') && !$expose['is_default']) {
            continue 2; // skip
          }
          if ($exposed_filter_values[$count]['filter'] == '**ALL**' ||
            (is_array($exposed_filter_values[$count]['filter']) && in_array('**ALL**', $exposed_filter_values[$count]['filter']))) {
            $view->used_filters["filter$count"] = $exposed_filter_values[$count]['filter'];
            continue 2; // skip this filter entirely.
          }
        }
        if (isset($exposed_filter_values[$count]['filter']) && $exposed_filter_values[$count]['filter'] != '') {
          $value = $exposed_filter_values[$count]['filter'];
          if ($filterinfo['value-type'] == 'array' && !is_array($value)) {
            $value = array($value);
          }
          $filter['value'] = $value;
          $view->used_filters["filter$count"] = $exposed_filter_values[$count]['filter'];
        }
        break;

This docu bug affects users who are attempting to insert/embed Views by-hand as described in http://drupal.org/node/48816.

Tested.

Comments

sun’s picture

Status: Active » Closed (won't fix)

Sorry, unfortunately this support request is way too specific. Please have a look at the issue queue - Views maintainers are buried already. You might want to try to get further support at http://drupal.org/support.