I've been looking through some other threads and couldn't find anything matching my problem (sorry if I just overlooked a dupe thread, though).

I want one of my Views displays to show filters (I'm using defaults to do this right now for simplicity's sake), while the other displays (attachment displays) show the actual tables of data (1 table per content type, but all content types share certain fields, which is why I'll only have one set of filters for all the various attachment displays).

Here is my basic set-up...

defaults display:
exposed filter for Nid
fields: Nid

attachment display:
non-exposed filter for content type (content type must be "ad space")
fields: Nid (just to show for this bug report which record should be filtered for if it were to work properly), and title
inherit arguments: no (I've tried with yes, and it still didn't solve my problem)
inherit exposed filters: yes
attach to: defaults

My problem, as you can see in my screenshots, is that the filter only filters the defaults set of data and does nothing to the attachment display's set of data. (Note that this problem occurs in both the "preview" feature of Views, and when I embed the view via a views_embed_view function within a tpl.php file).

(Additionally, but this is not something I'm too worried about, the exposed filters show up twice if I don't have any exposed filters in the attachment display. This second bug is reported elsewhere, so again, I'm not too concerned about it).

Here is my Views export:

$view = new view;
$view->name = 'testfilters';
$view->description = 'Test Filters';
$view->tag = 'filters';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('fields', array(
  'nid' => array(
    'label' => 'Nid',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'exclude' => 0,
    'id' => 'nid',
    'table' => 'node',
    'field' => 'nid',
    'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
  'nid' => array(
    'operator' => '=',
    'value' => array(
      'value' => '',
      'min' => '',
      'max' => '',
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'nid_op',
      'identifier' => 'nid',
      'label' => 'Node: Nid',
      'optional' => 1,
      'remember' => 0,
    ),
    'id' => 'nid',
    'table' => 'node',
    'field' => 'nid',
    'relationship' => 'none',
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('header_format', '1');
$handler->override_option('header_empty', 0);
$handler->override_option('use_ajax', TRUE);
$handler->override_option('use_pager', 'mini');
$handler->override_option('style_plugin', 'table');
$handler->override_option('style_options', array(
  'grouping' => '',
  'override' => 1,
  'sticky' => 0,
  'order' => 'asc',
  'columns' => array(
    'title' => 'title',
    'field_adspace_region_value' => 'field_adspace_region_value',
  ),
  'info' => array(
    'title' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'field_adspace_region_value' => array(
      'separator' => '',
    ),
  ),
  'default' => '-1',
));
$handler = $view->new_display('attachment', 'attachadspace', 'attachment_2');
$handler->override_option('fields', array(
  'title' => array(
    'label' => 'Title',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 1,
    'exclude' => 0,
    'id' => 'title',
    'table' => 'node',
    'field' => 'title',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Use default',
    ),
  ),
  'nid' => array(
    'label' => 'Nid',
    'alter' => array(
      'alter_text' => 0,
      'text' => '',
      'make_link' => 0,
      'path' => '',
      'link_class' => '',
      'alt' => '',
      'prefix' => '',
      'suffix' => '',
      'help' => '',
      'trim' => 0,
      'max_length' => '',
      'word_boundary' => 1,
      'ellipsis' => 1,
      'strip_tags' => 0,
      'html' => 0,
    ),
    'link_to_node' => 0,
    'exclude' => 0,
    'id' => 'nid',
    'table' => 'node',
    'field' => 'nid',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'adspace' => 'adspace',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => 'type_op',
      'label' => 'Node: Type',
      'use_operator' => 0,
      'identifier' => 'type',
      'optional' => 1,
      'single' => 1,
      'remember' => 0,
      'reduce' => 0,
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'override' => array(
      'button' => 'Use default',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('title', 'Ad Space Attach Title');
$handler->override_option('style_options', array(
  'grouping' => '',
  'override' => 1,
  'sticky' => 0,
  'order' => 'asc',
  'columns' => array(
    'title' => 'title',
    'nid' => 'nid',
  ),
  'info' => array(
    'title' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'nid' => array(
      'sortable' => 0,
      'separator' => '',
    ),
  ),
  'default' => '-1',
));
$handler->override_option('attachment_position', 'after');
$handler->override_option('inherit_arguments', 0);
$handler->override_option('inherit_exposed_filters', 1);
$handler->override_option('displays', array(
  'default' => 'default',
  'embed_1' => 0,
));
CommentFileSizeAuthor
filterstest2.jpg122.27 KBChris Einkauf
filterstest1.jpg135.65 KBChris Einkauf
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RahulB’s picture

I have the same issue, my attached view does not filter even though inherit exposed filter is on.
Are there any config/settings that have worked for anybody?

merlinofchaos’s picture

Status: Active » Fixed

This is a little bit tricky.

What you need to do is add the 'nid' filter to the attachment and set it to 'exposed'. By inheriting the exposed filters, it should then get its value from there.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

milehighlife’s picture

I have a similar problem.

Here is my set-up...

Page view:
Style: Gmap
Fields: Node Title, Location (Address)
Exposed filters for: Node Title, Color (Taxonomy Term ID via select list)

Attachment view:
Style: Unordered list
Fields: Node Title
Inherit arguments: Yes
Inherit exposed filters: Yes
Attach to: Page

When I select a different color from the Color taxonomy select list, the Page view renders correctly with filtered nodes. However, the Attachment view displays all nodes.

Primsi’s picture

#2 worked for me also. First I couldn't get it to work, then I noticed that the 'Filter identifier' in the attachment's exposed filter wasn't the same as in the page's exposed filter. When I corrected this it started to work.

twooten’s picture

Status: Closed (fixed) » Active

I hate to open this again but it's driving me nuts. I have a view page display that lists property for rent. I've put an attachment view on it that displays at Gmap. I can't seem to get the map to show the same listings. I have tried adding an nid and exposing it like merlinofchaos said in #2.

Here is an export of my view.

Thanks for any help.

$view = new view;
$view->name = 'property_rental_residential';
$view->description = 'A view of all residential rental listings';
$view->tag = '';
$view->view_php = '';
$view->base_table = 'node';
$view->is_cacheable = FALSE;
$view->api_version = 2;
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */
$handler = $view->new_display('default', 'Defaults', 'default');
$handler->override_option('relationships', array(
'field_address_lid' => array(
'label' => 'Location',
'required' => 0,
'id' => 'field_address_lid',
'table' => 'node_data_field_address',
'field' => 'field_address_lid',
'relationship' => 'none',
),
));
$handler->override_option('fields', array(
'title' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'type' => array(
'operator' => 'in',
'value' => array(
'property_listing' => 'property_listing',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
));
$handler->override_option('access', array(
'type' => 'none',
));
$handler->override_option('cache', array(
'type' => 'none',
));
$handler->override_option('title', 'Rental Listings');
$handler->override_option('header_format', '1');
$handler->override_option('header_empty', 0);
$handler->override_option('empty', 'Sorry, no listings were found matching your query.');
$handler->override_option('empty_format', '1');
$handler->override_option('items_per_page', 20);
$handler->override_option('style_plugin', 'semanticviews_default');
$handler->override_option('style_options', array(
'grouping' => '',
'group' => array(
'element_type' => 'h3',
'class' => 'title',
),
'list' => array(
'element_type' => '',
'class' => '',
),
'row' => array(
'element_type' => 'div',
'class' => 'apt_list',
'last_every_nth' => '0',
'first_class' => 'first',
'last_class' => 'last',
'striping_classes' => 'odd even',
),
));
$handler->override_option('row_plugin', 'semanticviews_fields');
$handler->override_option('row_options', array(
'semantic_html' => array(
'field_rental_image_fid' => array(
'element_type' => 'div',
'class' => '',
),
'title' => array(
'element_type' => 'div',
'class' => '',
),
'field_bathrooms_value' => array(
'element_type' => 'div',
'class' => '',
'label_element_type' => 'label',
'label_class' => '',
),
'field_bedrooms_value' => array(
'element_type' => 'div',
'class' => '',
'label_element_type' => 'label',
'label_class' => '',
),
'field_monthly_rent_value' => array(
'element_type' => 'div',
'class' => '',
'label_element_type' => 'label',
'label_class' => '',
),
'field_phone_value' => array(
'element_type' => 'div',
'class' => '',
'label_element_type' => 'label',
'label_class' => '',
),
'field_property_description_value' => array(
'element_type' => 'div',
'class' => '',
'label_element_type' => 'label',
'label_class' => '',
),
),
'skip_blank' => 0,
));
$handler = $view->new_display('page', 'Residential Listings', 'page_1');
$handler->override_option('fields', array(
'field_rental_image_fid' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 1,
'label_type' => 'none',
'format' => '150wide_linked',
'multiple' => array(
'group' => 1,
'multiple_number' => '1',
'multiple_from' => '',
'multiple_reversed' => 0,
),
'exclude' => 1,
'id' => 'field_rental_image_fid',
'table' => 'node_data_field_rental_image',
'field' => 'field_rental_image_fid',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'nid' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'exclude' => 1,
'id' => 'nid',
'table' => 'node',
'field' => 'nid',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'title' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 1,
'exclude' => 1,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'view_node' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'text' => 'Read full description',
'exclude' => 1,
'id' => 'view_node',
'table' => 'node',
'field' => 'view_node',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'field_rent_value' => array(
'label' => 'Monthly Rent',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 1,
'id' => 'field_rent_value',
'table' => 'node_data_field_rent',
'field' => 'field_rent_value',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'field_bathrooms_value' => array(
'label' => 'Bathrooms',
'alter' => array(
'alter_text' => 1,
'text' => '[field_bathrooms_value] Bathrooms',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 1,
'empty_zero' => 0,
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 1,
'id' => 'field_bathrooms_value',
'table' => 'node_data_field_bathrooms',
'field' => 'field_bathrooms_value',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'field_bedrooms_value' => array(
'label' => 'Bedrooms',
'alter' => array(
'alter_text' => 1,
'text' => '[field_bedrooms_value] Bedrooms',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 1,
'empty_zero' => 0,
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 1,
'id' => 'field_bedrooms_value',
'table' => 'node_data_field_bedrooms',
'field' => 'field_bedrooms_value',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'field_phone_value' => array(
'label' => 'Phone',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 1,
'id' => 'field_phone_value',
'table' => 'node_data_field_phone',
'field' => 'field_phone_value',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'field_property_description_value' => array(
'label' => 'Property Description',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 1,
'max_length' => '200',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 1,
'empty_zero' => 0,
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'group' => TRUE,
'multiple_number' => '',
'multiple_from' => '',
'multiple_reversed' => FALSE,
),
'exclude' => 1,
'id' => 'field_property_description_value',
'table' => 'node_data_field_property_description',
'field' => 'field_property_description_value',
'override' => array(
'button' => 'Override',
),
'relationship' => 'none',
),
'city' => array(
'label' => '',
'alter' => array(
'alter_text' => 1,
'text' => '[city],',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 1,
'empty_zero' => 0,
'exclude' => 1,
'id' => 'city',
'table' => 'location',
'field' => 'city',
'relationship' => 'field_address_lid',
),
'latitude' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'style' => 'dd',
'exclude' => 1,
'id' => 'latitude',
'table' => 'location',
'field' => 'latitude',
'relationship' => 'field_address_lid',
),
'longitude' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'style' => 'dd',
'exclude' => 1,
'id' => 'longitude',
'table' => 'location',
'field' => 'longitude',
'relationship' => 'field_address_lid',
),
'postal_code' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 1,
'empty_zero' => 0,
'exclude' => 1,
'id' => 'postal_code',
'table' => 'location',
'field' => 'postal_code',
'relationship' => 'field_address_lid',
),
'province' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 1,
'empty_zero' => 0,
'style' => 'name',
'exclude' => 1,
'id' => 'province',
'table' => 'location',
'field' => 'province',
'relationship' => 'field_address_lid',
),
'street' => array(
'label' => 'Street',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 1,
'empty_zero' => 0,
'style' => 'additional',
'exclude' => 1,
'id' => 'street',
'table' => 'location',
'field' => 'street',
'relationship' => 'field_address_lid',
'override' => array(
'button' => 'Use default',
),
),
'title_1' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 1,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'exclude' => 1,
'id' => 'title_1',
'table' => 'node',
'field' => 'title',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'field_date_available_value' => array(
'label' => 'Date Available',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 0,
'label_type' => 'widget',
'format' => 'default',
'multiple' => array(
'multiple_number' => '',
'multiple_from' => '',
'multiple_to' => '',
'group' => TRUE,
),
'repeat' => array(
'show_repeat_rule' => '',
),
'fromto' => array(
'fromto' => 'both',
),
'exclude' => 1,
'id' => 'field_date_available_value',
'table' => 'node_data_field_date_available',
'field' => 'field_date_available_value',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'markup' => array(
'label' => '',
'alter' => array(
'alter_text' => 1,
'text' => '

[title]
[street]
[city] [province] [postal_code]
[field_phone_value]
[field_property_description_value]

',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'value' => '',
'format' => '1',
'exclude' => 0,
'id' => 'markup',
'table' => 'customfield',
'field' => 'markup',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler->override_option('sorts', array(
'field_rent_value' => array(
'order' => 'DESC',
'delta' => -1,
'id' => 'field_rent_value',
'table' => 'node_data_field_rent',
'field' => 'field_rent_value',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'type' => array(
'operator' => 'in',
'value' => array(
'property_listing' => 'property_listing',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'city' => array(
'operator' => '=',
'value' => '',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'city_op',
'identifier' => 'city',
'label' => 'City',
'optional' => 1,
'remember' => 0,
),
'case' => 1,
'id' => 'city',
'table' => 'location',
'field' => 'city',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'field_address_lid',
),
'province' => array(
'operator' => 'IS',
'value' => '',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'province_op',
'identifier' => 'province',
'label' => 'State',
'optional' => 1,
'single' => 1,
'remember' => 0,
),
'id' => 'province',
'table' => 'location',
'field' => 'province',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'field_address_lid',
),
'postal_code' => array(
'operator' => '=',
'value' => '',
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'postal_code_op',
'identifier' => 'postal_code',
'label' => 'Zip',
'optional' => 1,
'remember' => 0,
),
'case' => 1,
'id' => 'postal_code',
'table' => 'location',
'field' => 'postal_code',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'field_address_lid',
),
'field_area_of_town_value_many_to_one' => array(
'operator' => 'or',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_area_of_town_value_many_to_one_op',
'identifier' => 'field_area_of_town_value_many_to_one',
'label' => 'Area of Town',
'bef_filter_description' => '',
'bef_format' => 'default',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
'bef_select_all_none' => 0,
),
'id' => 'field_area_of_town_value_many_to_one',
'table' => 'node_data_field_area_of_town',
'field' => 'field_area_of_town_value_many_to_one',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'reduce_duplicates' => 0,
),
'field_property_type_value_many_to_one' => array(
'operator' => 'or',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_property_type_value_many_to_one_op',
'identifier' => 'field_property_type_value_many_to_one',
'label' => 'Property Type',
'bef_filter_description' => '',
'bef_format' => 'default',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
'bef_select_all_none' => 0,
),
'id' => 'field_property_type_value_many_to_one',
'table' => 'node_data_field_property_type',
'field' => 'field_property_type_value_many_to_one',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'reduce_duplicates' => 0,
),
'field_bedrooms_value_many_to_one' => array(
'operator' => 'or',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_bedrooms_value_many_to_one_op',
'identifier' => 'field_bedrooms_value_many_to_one',
'label' => 'Bedrooms',
'bef_filter_description' => '',
'bef_format' => 'default',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
'bef_select_all_none' => 0,
),
'id' => 'field_bedrooms_value_many_to_one',
'table' => 'node_data_field_bedrooms',
'field' => 'field_bedrooms_value_many_to_one',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'reduce_duplicates' => 0,
),
'field_bathrooms_value_many_to_one' => array(
'operator' => 'or',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_bathrooms_value_many_to_one_op',
'identifier' => 'field_bathrooms_value_many_to_one',
'label' => 'Bathroom',
'bef_filter_description' => '',
'bef_format' => 'default',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
'bef_select_all_none' => 0,
),
'id' => 'field_bathrooms_value_many_to_one',
'table' => 'node_data_field_bathrooms',
'field' => 'field_bathrooms_value_many_to_one',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'reduce_duplicates' => 0,
),
'field_rent_value_1' => array(
'operator' => '>=',
'value' => array(
'value' => '',
'min' => '',
'max' => '',
),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_rent_value_1_op',
'identifier' => 'field_min_rent_value_1',
'label' => 'Price',
'optional' => 1,
'remember' => 0,
),
'id' => 'field_rent_value_1',
'table' => 'node_data_field_rent',
'field' => 'field_rent_value',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'field_rent_value_2' => array(
'operator' => '<=',
'value' => array(
'value' => '',
'min' => '',
'max' => '',
),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_rent_value_2_op',
'identifier' => 'field_max_rent_value_2',
'label' => 'To',
'optional' => 1,
'remember' => 0,
),
'id' => 'field_rent_value_2',
'table' => 'node_data_field_rent',
'field' => 'field_rent_value',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'field_pets_allowed_value_many_to_one' => array(
'operator' => 'or',
'value' => array(),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'field_pets_allowed_value_many_to_one_op',
'identifier' => 'field_pets_allowed_value_many_to_one',
'label' => 'Pets Allowed',
'bef_filter_description' => '',
'bef_format' => 'default',
'optional' => 1,
'single' => 1,
'remember' => 0,
'reduce' => 0,
'bef_select_all_none' => 0,
),
'id' => 'field_pets_allowed_value_many_to_one',
'table' => 'node_data_field_pets_allowed',
'field' => 'field_pets_allowed_value_many_to_one',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'reduce_duplicates' => 0,
),
'date_filter' => array(
'operator' => '<=',
'value' => array(
'value' => NULL,
'min' => NULL,
'max' => NULL,
'default_date' => '',
'default_to_date' => '',
),
'group' => '0',
'exposed' => TRUE,
'expose' => array(
'use_operator' => 0,
'operator' => 'date_filter_op',
'identifier' => 'date_filter',
'label' => 'Availability',
'optional' => 1,
'remember' => 0,
),
'date_fields' => array(
'node_data_field_date_available.field_date_available_value' => 'node_data_field_date_available.field_date_available_value',
),
'date_method' => 'OR',
'granularity' => 'day',
'form_type' => 'date_popup',
'default_date' => '',
'default_to_date' => '',
'year_range' => '-3:+3',
'id' => 'date_filter',
'table' => 'node',
'field' => 'date_filter',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'status' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'field_res_for_rent_value_many_to_one' => array(
'operator' => 'or',
'value' => array(
'TRUE' => 'TRUE',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'field_res_for_rent_value_many_to_one',
'table' => 'node_data_field_res_for_rent',
'field' => 'field_res_for_rent_value_many_to_one',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
'reduce_duplicates' => 0,
),
));
$handler->override_option('title', 'Residential Listings');
$handler->override_option('use_pager', '1');
$handler->override_option('style_options', array(
'grouping' => '',
'group' => array(
'element_type' => 'h3',
'class' => 'title',
),
'list' => array(
'element_type' => '',
'class' => '',
),
'row' => array(
'element_type' => 'div',
'class' => '',
'last_every_nth' => '0',
'first_class' => 'first',
'last_class' => 'last',
'striping_classes' => 'odd even',
),
));
$handler->override_option('exposed_block', TRUE);
$handler->override_option('path', 'residential-rental-listings');
$handler->override_option('menu', array(
'type' => 'none',
'title' => 'Residential Listings',
'description' => 'Residential Listings',
'weight' => '0',
'name' => 'primary-links',
));
$handler->override_option('tab_options', array(
'type' => 'none',
'title' => '',
'description' => '',
'weight' => 0,
'name' => 'navigation',
));
$handler = $view->new_display('attachment', 'Map Attachment', 'attachment_1');
$handler->override_option('fields', array(
'title' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'link_to_node' => 1,
'exclude' => 0,
'id' => 'title',
'table' => 'node',
'field' => 'title',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
'latitude' => array(
'label' => 'Latitude',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'style' => 'dd',
'exclude' => 1,
'id' => 'latitude',
'table' => 'location',
'field' => 'latitude',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'field_address_lid',
),
'longitude' => array(
'label' => 'Longitude',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'style' => 'dd',
'exclude' => 1,
'id' => 'longitude',
'table' => 'location',
'field' => 'longitude',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'field_address_lid',
),
'address' => array(
'label' => '',
'alter' => array(
'alter_text' => 0,
'text' => '',
'make_link' => 0,
'path' => '',
'link_class' => '',
'alt' => '',
'prefix' => '',
'suffix' => '',
'target' => '',
'help' => '',
'trim' => 0,
'max_length' => '',
'word_boundary' => 1,
'ellipsis' => 1,
'html' => 0,
'strip_tags' => 0,
),
'empty' => '',
'hide_empty' => 0,
'empty_zero' => 0,
'hide' => array(
'name' => 'name',
'country' => 'country',
'locpick' => 'locpick',
'country_name' => 'country_name',
'map_link' => 'map_link',
'coords' => 'coords',
'street' => 0,
'additional' => 0,
'city' => 0,
'province' => 0,
'postal_code' => 0,
'province_name' => 0,
),
'exclude' => 0,
'id' => 'address',
'table' => 'location',
'field' => 'address',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'field_address_lid',
),
));
$handler->override_option('sorts', array(
'field_monthly_pay_rent_value' => array(
'order' => 'DESC',
'delta' => -1,
'id' => 'field_monthly_pay_rent_value',
'table' => 'node_data_field_monthly_pay_rent',
'field' => 'field_monthly_pay_rent_value',
'override' => array(
'button' => 'Use default',
),
'relationship' => 'none',
),
));
$handler->override_option('filters', array(
'status' => array(
'operator' => '=',
'value' => '1',
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'status',
'table' => 'node',
'field' => 'status',
'relationship' => 'none',
),
'type' => array(
'operator' => 'in',
'value' => array(
'property_listing' => 'property_listing',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'type',
'table' => 'node',
'field' => 'type',
'relationship' => 'none',
'override' => array(
'button' => 'Override',
),
),
'field_res_for_rent_value_many_to_one' => array(
'operator' => 'or',
'value' => array(
'TRUE' => 'TRUE',
),
'group' => '0',
'exposed' => FALSE,
'expose' => array(
'operator' => FALSE,
'label' => '',
),
'id' => 'field_res_for_rent_value_many_to_one',
'table' => 'node_data_field_res_for_rent',
'field' => 'field_res_for_rent_value_many_to_one',
'relationship' => 'none',
'reduce_duplicates' => 0,
'override' => array(
'button' => 'Use default',
),
),
));
$handler->override_option('empty', '');
$handler->override_option('style_plugin', 'gmap');
$handler->override_option('style_options', array(
'grouping' => '',
'macro' => '[gmap | zoom=6 | width=100% | height=200px | control=Small | type=Map | behavior=+autozoom]',
'datasource' => 'fields',
'latfield' => 'latitude',
'lonfield' => 'longitude',
'markers' => 'static',
'markerfield' => 'title',
'markertype' => 'small red',
));
$handler->override_option('row_plugin', 'fields');
$handler->override_option('row_options', array(
'inline' => array(),
'separator' => '',
'hide_empty' => 0,
));
$handler->override_option('attachment_position', 'before');
$handler->override_option('inherit_arguments', 1);
$handler->override_option('inherit_exposed_filters', 1);
$handler->override_option('inherit_pager', 1);
$handler->override_option('render_pager', 0);
$handler->override_option('displays', array(
'page_1' => 'page_1',
'default' => 0,
));

iamjon’s picture

twooten,
did you ever find a solution for this?
if yes please post it so others can benefit.
if no can you repost the view with simple content types so that it can be easily replicated.

iamjon’s picture

Status: Active » Closed (cannot reproduce)

Closing issue. Please feel free to reopen with more information.

jvieille’s picture

Status: Closed (cannot reproduce) » Active

I have this problem too, erratically.
It never worked on one views, but another similar succeeded.
I suppose that recreating a failing views from scratch might help to fix.

petednz’s picture

i have this problem currently - trying to see what i am doing wrong, but maybe i am not 'wrong'

My first 'page' has an exposed filter - i enter the ID in it, it filters the View.

I add an 'attachment' set to

- 'after' above page

- inherit exposed filter = YES

but the 'attached' view does not filter based on the exposed filter
I have tried it both with the same 'exposed filter' set in the Filter Criteria for the attachment, and with it removed.
no difference that I can discern - i still see 'everything' in the attachment

petednz’s picture

Got around it by using Contextual Filter instead

GemVinny’s picture

I have the same issue for D7, what did you do with contextual filters?

Thanks!

petednz’s picture

am not quite sure as is a while ago but it involved adding a Contextual Filter (under Advanced) that then applied the required to the attachment - sorry i can't be clearer

jcam88’s picture

Verify that the exposed filter on both the view and attachment has the same "Filter Identifier" under "More" in the filters settings.

jenlampton’s picture

Version: 6.x-2.6 » 7.x-3.7

I'm also having this problem with the latest version of Views for Drupal 7.

My content pane view has an exposed filter for "county" as does the attachment.
Both exposed filters have the filter identifier 'field_county_value'.
Using the exposed filter on pane config (for the content pane) narrows the results of the main (content pane) display, but not the attachment display.

Update: I was able to get the exposed filters on the attachment working by doing two things.
1) unchecking the Allow settings option: Use exposed widgets form as pane configuration
2) setting the "Use panel path" setting to YES

I'm going to set this issue back to it's previous settings and open a new one, I think this is something different.

jenlampton’s picture

Version: 7.x-3.7 » 6.x-2.16

setting version back

Garrett Albright’s picture

This is stumping me too on D7. I thought I had it working at one point, but I had to keep fiddling with it and then it stopped working (if it really *was* working and I wasn't mistaken) and I haven't been able to get it back…

I'm not using Panels, so there's no clues in jen's post. I also found this SO post, but it's not helping either.

Garrett Albright’s picture

Okay, I decided to try to play with this more today. I set up my attachment, then saved the node and started playing with it on the page view instead of just the Views preview, because I wanted to dpm() the data from Views hooks and see if I couldn't coax it into working somehow… but then I noticed it was working. So I checked it out in the Views UI preview again, and… nope.

So maybe the real problem is that inherited filters don't work in the Views UI's preview…?

mstrelan’s picture

For me it seems the issue only occurs when "Use AJAX" is enabled. This may be why you're only experiencing the issue in the Views UI...

aniket.mohite88’s picture

This works for me.
Have to follow these both points to get the desired result.

  1. From #2: Add the required filter to the attachment, as well and set it to 'exposed'. By inheriting the exposed filters, it should then get its value from there.
  2. From #14:Verify that the exposed filter on both the view and attachment has the same "Filter Identifier" under "More" in the filters settings. This is important

Thanks a lot to merlinofchaos & jcam88 for pointing these out. Thanks again.

Regards,
Aniket Mohite

hockey2112’s picture

Six years later, #2 has saved my sanity. Thanks!!

Anonymous’s picture

#20 has got it.

I started with a block view. For each attachment:

  1. Turn on 'Inherit exposed filters' under 'Attachment Settings'
  2. Under 'Filter Criteria,' add the same filter(s) used in your view with the same settings
  3. Check:
  • Filters in both the view and attachment should be set to 'exposed'
  • The 'Filter Identifier' under 'More' in both the view and attachment should be the same -- if not, change them so that they are
scott.browne’s picture

#20 did it for me. Having the exact exposed filter was mandatory for the inheritance.

hmartens’s picture

Thank you so much! #20n worked for me!

One problem I still have is that it's also displaying for the filter -All-

Does anyone know how to make have the attachment not show for -All- filter?

Chris Matthews’s picture

Status: Active » Closed (outdated)

The Drupal 6 branch is no longer supported, please check with the D6LTS project if you need further support. For more information as to why this issue was closed, please see issue #3030347: Plan to clean process issue queue