Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
there is a little problem that I found in a view that uses aggrigation. When I add a field to the sort or filter criteria and set the aggrigation type eg. to count i get the "Broken/missing handler" error for this field.
I hope someone could take a look at this.
Thanks!
$view = new view;
$view->name = 'groupview';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node';
$view->human_name = 'groupView';
$view->core = 7;
$view->api_version = '3.0-alpha1';
$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['group_by'] = TRUE;
$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['pager']['options']['offset'] = '0';
$handler->display->display_options['style_plugin'] = 'table';
$handler->display->display_options['style_options']['columns'] = array(
'title' => 'title',
'field_group' => 'field_group',
);
$handler->display->display_options['style_options']['default'] = '-1';
$handler->display->display_options['style_options']['info'] = array(
'title' => array(
'sortable' => 0,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
),
'field_group' => array(
'sortable' => 0,
'default_sort_order' => 'asc',
'align' => '',
'separator' => '',
),
);
$handler->display->display_options['style_options']['override'] = 1;
$handler->display->display_options['style_options']['sticky'] = 0;
$handler->display->display_options['style_options']['empty_table'] = 0;
/* Field: Content: Group */
$handler->display->display_options['fields']['field_group']['id'] = 'field_group';
$handler->display->display_options['fields']['field_group']['table'] = 'field_data_field_group';
$handler->display->display_options['fields']['field_group']['field'] = 'field_group';
$handler->display->display_options['fields']['field_group']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['field_group']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['field_group']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['field_group']['alter']['external'] = 0;
$handler->display->display_options['fields']['field_group']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['field_group']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['field_group']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['field_group']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['field_group']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['field_group']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['field_group']['alter']['trim'] = 0;
$handler->display->display_options['fields']['field_group']['alter']['html'] = 0;
$handler->display->display_options['fields']['field_group']['element_label_colon'] = 1;
$handler->display->display_options['fields']['field_group']['element_default_classes'] = 1;
$handler->display->display_options['fields']['field_group']['hide_empty'] = 0;
$handler->display->display_options['fields']['field_group']['empty_zero'] = 0;
$handler->display->display_options['fields']['field_group']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['field_group']['field_api_classes'] = 0;
/* Field: COUNT(Content: Nid) */
$handler->display->display_options['fields']['nid']['id'] = 'nid';
$handler->display->display_options['fields']['nid']['table'] = 'node';
$handler->display->display_options['fields']['nid']['field'] = 'nid';
$handler->display->display_options['fields']['nid']['group_type'] = 'count';
$handler->display->display_options['fields']['nid']['alter']['alter_text'] = 0;
$handler->display->display_options['fields']['nid']['alter']['make_link'] = 0;
$handler->display->display_options['fields']['nid']['alter']['absolute'] = 0;
$handler->display->display_options['fields']['nid']['alter']['external'] = 0;
$handler->display->display_options['fields']['nid']['alter']['replace_spaces'] = 0;
$handler->display->display_options['fields']['nid']['alter']['trim_whitespace'] = 0;
$handler->display->display_options['fields']['nid']['alter']['nl2br'] = 0;
$handler->display->display_options['fields']['nid']['alter']['word_boundary'] = 1;
$handler->display->display_options['fields']['nid']['alter']['ellipsis'] = 1;
$handler->display->display_options['fields']['nid']['alter']['strip_tags'] = 0;
$handler->display->display_options['fields']['nid']['alter']['trim'] = 0;
$handler->display->display_options['fields']['nid']['alter']['html'] = 0;
$handler->display->display_options['fields']['nid']['element_label_colon'] = 1;
$handler->display->display_options['fields']['nid']['element_default_classes'] = 1;
$handler->display->display_options['fields']['nid']['hide_empty'] = 0;
$handler->display->display_options['fields']['nid']['empty_zero'] = 0;
$handler->display->display_options['fields']['nid']['hide_alter_empty'] = 0;
$handler->display->display_options['fields']['nid']['format_plural'] = 0;
/* Sort criterion: Broken/missing handler */
$handler->display->display_options['sorts']['nid']['id'] = 'nid';
$handler->display->display_options['sorts']['nid']['table'] = 'node';
$handler->display->display_options['sorts']['nid']['field'] = 'nid';
$handler->display->display_options['sorts']['nid']['group_type'] = 'count';
/* 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']['expose']['operator'] = FALSE;
/* Filter criterion: Content: Type */
$handler->display->display_options['filters']['type']['id'] = 'type';
$handler->display->display_options['filters']['type']['table'] = 'node';
$handler->display->display_options['filters']['type']['field'] = 'type';
$handler->display->display_options['filters']['type']['value'] = array(
'viewsgroupingtest' => 'viewsgroupingtest',
);
Comments
Comment #1
braindrift CreditAttribution: braindrift commentedany idea?
Comment #2
dawehnerJust commited a fix, can you please wait for the next dev version(tomorrow and clear all caches twice, and run update.php)
This would need a registry rebuild.
Comment #3
acbramley CreditAttribution: acbramley commentedsub
Comment #4
rafamatito CreditAttribution: rafamatito commentedsub
Comment #6
anonym-developer CreditAttribution: anonym-developer commentedsub
Comment #7
acbramley CreditAttribution: acbramley commentedCan confirm that this was fixed.
Comment #8
prodigeek CreditAttribution: prodigeek commentedThis is not fixed. I have the most up to date dev version and I get the broken arg message when I try to sort by NID with count. If I don't use count aggregation, then every node appears as one option.
Thank you very much for your help.
Comment #9
anonym-developer CreditAttribution: anonym-developer commentedI had the same problem, that I created the view again manually and it worked for me.
Comment #10
Letharion CreditAttribution: Letharion commentedGiven that this has been confimed fixed, I'm resetting the status as such.
@prodigeek, if you do still experience this, please open a different issue, as you're problem is likely caused by something else.
Comment #12
prodigeek CreditAttribution: prodigeek commentedThis bug has come back in the two most recent dev versions of Views. Several views of mine broke and I tried rebuilding them and still found the same error.
Comment #13
daroz CreditAttribution: daroz commentedConfirming this regression as well in 7.x-3.0-rc1. Went from early-Sept -dev to -rc1 and got several broken views.
Comment #14
daroz CreditAttribution: daroz commentedQuick update - updated to -dev Nov 12 and its working correctly again... /boggle
Comment #15
mstrelan CreditAttribution: mstrelan commentedThis is definitely broken in -dev Nov 14...
Comment #16
dawehnerCan you tell us a bit more about the error message you get? Maybe also the configured view would be cool as well.
Take sure that you have at least RC3 so the usual problems are fixed already.
There might be some registry issues here, so take sure to run update.php clear cache etc some time :)
Comment #17
justinph CreditAttribution: justinph commentedThis is working for me in 7.x-3.0 (stable). Hooray!
Comment #18
dawehneryeah