Active
Project:
Views (for Drupal 7)
Version:
7.x-3.5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
1 Feb 2013 at 21:11 UTC
Updated:
4 Feb 2013 at 21:08 UTC
I added an attached display table to a page table display. The attached display has just one field, and it is supposed to do a GROUP BY on that field. There is no GROUP BY. Each record is displayed individually. (The base display does not have aggregation turned on, but the attached display does.)
The field has aggregation settings of "Group results together".
Here is the SQL generated:
SELECT uc_orders.order_status AS uc_orders_order_status
FROM
{uc_orders} uc_orders
LIMIT 10 OFFSET 0
Note the lack of GROUP BY in the SQL.
Here is the export for just the problem display:
/* Display: Order type count */
$handler = $view->new_display('attachment', 'Order type count', 'attachment_1');
$handler->display->display_options['defaults']['title'] = FALSE;
$handler->display->display_options['title'] = 'Order type count';
$handler->display->display_options['defaults']['hide_admin_links'] = FALSE;
$handler->display->display_options['defaults']['group_by'] = FALSE;
$handler->display->display_options['group_by'] = TRUE;
$handler->display->display_options['pager']['type'] = 'some';
$handler->display->display_options['defaults']['relationships'] = FALSE;
$handler->display->display_options['defaults']['fields'] = FALSE;
/* Field: Order: Order status */
$handler->display->display_options['fields']['order_status']['id'] = 'order_status';
$handler->display->display_options['fields']['order_status']['table'] = 'uc_orders';
$handler->display->display_options['fields']['order_status']['field'] = 'order_status';
$handler->display->display_options['defaults']['sorts'] = FALSE;
$handler->display->display_options['displays'] = array(
'page' => 'page',
'default' => 0,
);
$handler->display->display_options['inherit_exposed_filters'] = TRUE;
The full export for the view is attached.
| Comment | File | Size | Author |
|---|---|---|---|
| order_view_export_1.txt | 12.74 KB | DanZ |
Comments
Comment #1
DanZ commentedI know nothing about the export format, but does this mean something?
That seems right.... Does this mean it's taking the aggregation settings from the attachee display or the master display settings, not the current (attached display) settings?
Comment #1.0
DanZ commentedClarified a bit.