I have a block with an exposed date filter showing order details and an attachment display after it, using aggregation (SUM) to show grand totals. The attachment isn't inheriting the exposed date filter so it ends up showing totals for all orders, regardless of what date range is set.

"Inherit exposed filters" is set to Yes, there is nothing in the error log, and AJAX is turned on for the block and attachment.

Comments

OldAccount’s picture

StatusFileSize
new65.24 KB

Forgot to attach screenshot.

matslats’s picture

I have a similar complaint.
I'm not using aggregation.
And I'm not attaching to a block.

dawehner’s picture

Status: Active » Postponed (maintainer needs more info)

It would be certainly help a lot if you could provide a view which can be imported on a normal drupal installation.
So people can reproduce the bug and work on a fix, rather than trying to reproduce the bug for many minutes.

matslats’s picture

sorry my view is using all custom handlers so it would be hard for you to set up.

dawehner’s picture

So you even have custom filter handlers?

Maybe the problem is there.
Maybe you could build a similar kind of setup without your custom handlers.

matslats’s picture

Ok Here you go:
Import the view. Go to master display. The attachment overrides nothing but has (inherit exposed filters = TRUE)
On the exposed filter switch between node->published = TRUE and FALSE
The attachment display is the same in each case.

$view = new view;
$view->name = 'test';
$view->description = 'to test exposed filter inheritance';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'test';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'test';
$handler->display->display_options['access']['type'] = 'perm';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['query']['options']['query_comment'] = FALSE;
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/* Field: Content: Title */
$handler->display->display_options['fields']['title']['id'] = 'title';
$handler->display->display_options['fields']['title']['table'] = 'node';
$handler->display->display_options['fields']['title']['field'] = 'title';
$handler->display->display_options['fields']['title']['label'] = '';
$handler->display->display_options['fields']['title']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['title']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['title']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['title']['alter']['word_boundary'] = 0;
$handler->display->display_options['fields']['title']['alter']['ellipsis'] = 0;
$handler->display->display_options['fields']['title']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['title']['alter']['trim'] = 0;
$handler->display->display_options['fields']['title']['alter']['html'] = 0;
$handler->display->display_options['fields']['title']['hide_empty'] = 0;
$handler->display->display_options['fields']['title']['empty_zero'] = 0;
$handler->display->display_options['fields']['title']['link_to_node'] = 1;
/* Filter criterion: Content: Published */
$handler->display->display_options['filters']['status']['id'] = 'status';
$handler->display->display_options['filters']['status']['table'] = 'node';
$handler->display->display_options['filters']['status']['field'] = 'status';
$handler->display->display_options['filters']['status']['value'] = '1';
$handler->display->display_options['filters']['status']['group'] = 0;
$handler->display->display_options['filters']['status']['exposed'] = TRUE;
$handler->display->display_options['filters']['status']['expose']['operator_id'] = '';
$handler->display->display_options['filters']['status']['expose']['label'] = 'Published';
$handler->display->display_options['filters']['status']['expose']['use_operator'] = FALSE;
$handler->display->display_options['filters']['status']['expose']['operator'] = 'status_op';
$handler->display->display_options['filters']['status']['expose']['identifier'] = 'status';
$handler->display->display_options['filters']['status']['expose']['required'] = 1;
$handler->display->display_options['filters']['status']['expose']['multiple'] = FALSE;

/* Display: Page */
$handler = $view->new_display('page', 'Page', 'page');
$handler->display->display_options['path'] = 'test';

/* Display: Attachment */
$handler = $view->new_display('attachment', 'Attachment', 'attachment_1');
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['displays'] = array(
'default' => 'default',
'page' => 0,
);
$handler->display->display_options['attachment_position'] = 'after';
$handler->display->display_options['inherit_arguments'] = 0;
$handler->display->display_options['inherit_exposed_filters'] = 1;

esmerel’s picture

Status: Postponed (maintainer needs more info) » Active
videographics’s picture

StatusFileSize
new17.7 KB
new27.56 KB

I'm seeing the exact same thing from a page with an attachment. The aggregation in the attachment is ignoring the page's filters.

I've attached a screenshot and the view...

brephraim’s picture

Version: 7.x-3.0-rc3 » 7.x-3.5

I can confirm this is still an active issue.

bisonbleu’s picture

Priority: Normal » Major
Issue summary: View changes

Bummer, this is still an issue in 7.x-3.16! Bumping to major. Can someone suggest what might the problem be and/or a solution/workaround?

bisonbleu’s picture

Status: Active » Closed (works as designed)

AHA! It's not exactly intuitive but for the inheritance to work, the attachment display(s) must have the exact same exposed filters as the parent display. Another way to think about it: how can the attachment display inherit the value of an exposed filter if it doesn't itself have the very same exposed filter to pass the inherited value to? Doh!