The titel says it all.
an easy view with filter shown.

I Select any number of rows, or all with button or with chekbox.

the result stays:
"
Are you sure you want to perform delete node on selected rows?
You selected the following 0 rows:
"

pleas advice, thx

CommentFileSizeAuthor
#39 untitled.txt40.47 KBAnonymous (not verified)
#35 utenti_gruppi_test_veneto_views.txt134.71 KBAnonymous (not verified)
#2 views_bulk_operations-1077260.patch2.16 KBteliseo

Comments

infojunkie’s picture

The selection mechanism is new in the latest dev.
If you want to help debug it, please do the following:

* Enable devel.module
* Insert the following line

dsm($_SESSION['vbo_values'][$url]['objects']['selection']);

after line 375 in views_bulk_operations.module, which should say:

$url = url($_GET['q']);

Now select a few rows and click an action: what debug output gets printed?

teliseo’s picture

StatusFileSize
new2.16 KB

I was just ready to file a new issue, and then saw this one. Here’s my environment, which may differ from the OP’s:

  • Latest VBO 6.x-1.x-dev
  • Latest Date module (6.x-2.x-dev)
  • A modified admin_content view with an extra column for a CCK Date field

I see the same symptom as the OP: I select rows, select and execute any operation, and then get 0 rows on the confirmation page.

Here’s what’s happening: Because the Date field is present, the render() method in date/date/date_handler_field_multiple.inc is storing a date_info object in the values object. When the view form is generated, the selection checkboxes are associated with MD5 hashes of objects that have had this date_info object added. However, _views_bulk_operations_adjust_selection() (a processing function that leads to the confirmation page) calculates its MD5 hashes using non-fully-rendered objects (they lack date_info) and gets different results. It therefore finds no selection matches, and shows 0 rows selected.

My solution (attached patch) is to remove embedded objects and arrays from values objects for hash calculation, since normal rendered values should only be strings. This feels like a hack, but may resolve issues other than with the Date module. I think I understand the motivation for hashing the objects, as VBO cannot, in general, find another unique ID. However I think there might be fewer such problems if known unique IDs were used as selection values for a few common object types (e.g., nid for nodes and uid for users).

A more elegant solution would be to get the pre-rendered value objects when generating the view form, but I don’t understand the code well enough to know how to do that (or even if this is possible).

Another answer might be to blame the Date module for storing random stuff in the values object, but I haven’t seen any prohibition against this, and its implementation might be much more difficult or inefficient otherwise.

infojunkie’s picture

Thanks teliseo for the analysis and patch. The nid and other unique entity keys cannot be used because views might return different rows with the same entity key - e.g. when joining with one-to-many tables. That's what prompted this modification in the first place. I need to better understand this rendering issue - I'd love to rewrite the _views_bulk_operations_adjust_selection() function for other reasons too including saving some memory space.

ikeigenwijs, please apply this patch and let us know if this solves it for you - we'll have more confidence if it does. Otherwise, please post your view export to help me reproduce the problem on my side.

infojunkie’s picture

I was able to reproduce teliseo's scenario, working on it.

ikeigenwijs’s picture

I will test this tomorrow.

eafarris’s picture

I was having a similar issue with VBO telling me I didn't select any rows. The patch in #2 did fix the issue for me.

ikeigenwijs’s picture

The patch did not work for me: No rows were processed:
I dont use clean URL'
view has exposed filters
drupal 6.20
date2.7 not 2.x
everything up to date

views export:
$view = new view;
$view->name = 'vacatures_onderhoud';
$view->description = 'Alle vacatures onderhoud';
$view->tag = 'vacature';
$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(
  'title' => array(
    'label' => 'Titel',
    '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' => 'Overschrijf',
    ),
    'relationship' => 'none',
  ),
  'field_plaats_value' => array(
    'label' => 'Plaats',
    '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' => 'widget',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_plaats_value',
    'table' => 'node_data_field_plaats',
    'field' => 'field_plaats_value',
    'relationship' => 'none',
  ),
  'field_vacature_type_value' => array(
    'label' => 'Vacature type',
    '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' => 'widget',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_vacature_type_value',
    'table' => 'node_data_field_vacature_type',
    'field' => 'field_vacature_type_value',
    'relationship' => 'none',
  ),
  'field_eventuele_looptijd_value' => array(
    'label' => 'eventuele looptijd',
    '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,
    'link_to_node' => 0,
    'repeat' => array(
      'show_repeat_rule' => '',
    ),
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => TRUE,
    ),
    'fromto' => array(
      'fromto' => 'both',
    ),
    'label_type' => 'widget',
    'format' => 'default',
    'exclude' => 0,
    'id' => 'field_eventuele_looptijd_value',
    'table' => 'node_data_field_eventuele_looptijd',
    'field' => 'field_eventuele_looptijd_value',
    'relationship' => 'none',
  ),
  'field_publicatiedatum_value' => array(
    'label' => 'Publicatie datum (Start)',
    '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' => 'custom',
    'format' => 'default',
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => '',
    ),
    'repeat' => array(
      'show_repeat_rule' => '',
    ),
    'fromto' => array(
      'fromto' => 'value',
    ),
    'exclude' => 0,
    'id' => 'field_publicatiedatum_value',
    'table' => 'node_data_field_publicatiedatum',
    'field' => 'field_publicatiedatum_value',
    'relationship' => 'none',
  ),
  'field_publicatiedatum_value2' => array(
    'label' => 'Publicatie datum (einde)',
    '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' => 'custom',
    'format' => 'default',
    'multiple' => array(
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_to' => '',
      'group' => '',
    ),
    'repeat' => array(
      'show_repeat_rule' => '',
    ),
    'fromto' => array(
      'fromto' => 'value2',
    ),
    'exclude' => 0,
    'id' => 'field_publicatiedatum_value2',
    'table' => 'node_data_field_publicatiedatum',
    'field' => 'field_publicatiedatum_value2',
    'relationship' => 'none',
  ),
  'delete_node' => array(
    'label' => 'Link verwijderen',
    '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' => '',
    'exclude' => 0,
    'id' => 'delete_node',
    'table' => 'node',
    'field' => 'delete_node',
    'relationship' => 'none',
  ),
));
$handler->override_option('sorts', array(
  'created' => array(
    'order' => 'DESC',
    'granularity' => 'hour',
    'id' => 'created',
    'table' => 'node',
    'field' => 'created',
    'relationship' => 'none',
  ),
));
$handler->override_option('filters', array(
  'type' => array(
    'operator' => 'in',
    'value' => array(
      'vacature' => 'vacature',
    ),
    'group' => '0',
    'exposed' => FALSE,
    'expose' => array(
      'operator' => FALSE,
      'label' => '',
    ),
    'id' => 'type',
    'table' => 'node',
    'field' => 'type',
    'relationship' => 'none',
  ),
  'date_filter' => array(
    'operator' => '<=',
    'value' => array(
      'value' => '2011-01-01 00:00:00',
      'min' => '2011-01-01 00:00:00',
      'max' => '2011-01-01 00:00:00',
      'default_date' => 'now',
      'default_to_date' => '',
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 1,
      'operator' => 'date_filter_op',
      'identifier' => 'date_filter',
      'label' => 'Publicatie datum (begin)',
      'optional' => 1,
      'remember' => 1,
    ),
    'date_fields' => array(
      'node_data_field_publicatiedatum.field_publicatiedatum_value' => 'node_data_field_publicatiedatum.field_publicatiedatum_value',
    ),
    'date_method' => 'AND',
    'granularity' => 'day',
    'form_type' => 'date_select',
    'default_date' => 'now',
    'default_to_date' => '',
    'year_range' => '-3:+3',
    'id' => 'date_filter',
    'table' => 'node',
    'field' => 'date_filter',
    'relationship' => 'none',
  ),
  'date_filter_1' => array(
    'operator' => '>=',
    'value' => array(
      'value' => '2011-01-01 00:00:00',
      'min' => '2011-01-01 00:00:00',
      'max' => '2011-01-01 00:00:00',
      'default_date' => 'now',
      'default_to_date' => '',
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 1,
      'operator' => 'date_filter_1_op',
      'identifier' => 'date_filter_1',
      'label' => 'Publicatie datum (einde)',
      'optional' => 1,
      'remember' => 1,
    ),
    'date_fields' => array(
      'node_data_field_publicatiedatum.field_publicatiedatum_value2' => 'node_data_field_publicatiedatum.field_publicatiedatum_value2',
    ),
    'date_method' => 'AND',
    'granularity' => 'day',
    'form_type' => 'date_select',
    'default_date' => 'now',
    'default_to_date' => '',
    'year_range' => '-3:+3',
    'id' => 'date_filter_1',
    'table' => 'node',
    'field' => 'date_filter',
    'relationship' => 'none',
  ),
  'field_plaats_value' => array(
    'operator' => '=',
    'value' => '',
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'field_plaats_value_op',
      'identifier' => 'field_plaats_value',
      'label' => 'Plaats',
      'optional' => 1,
      'remember' => 0,
    ),
    'case' => 1,
    'id' => 'field_plaats_value',
    'table' => 'node_data_field_plaats',
    'field' => 'field_plaats_value',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Override',
    ),
  ),
  'field_vacature_type_value' => array(
    'operator' => '=',
    'value' => '',
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'field_vacature_type_value_op',
      'identifier' => 'field_vacature_type_value',
      'label' => 'Vacature type',
      'optional' => 1,
      'remember' => 0,
    ),
    'case' => 1,
    'id' => 'field_vacature_type_value',
    'table' => 'node_data_field_vacature_type',
    'field' => 'field_vacature_type_value',
    'relationship' => 'none',
    'override' => array(
      'button' => 'Override',
    ),
  ),
));
$handler->override_option('access', array(
  'type' => 'role',
  'role' => array(
    '3' => 3,
    '5' => 5,
    '6' => 6,
  ),
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('items_per_page', 30);
$handler->override_option('use_pager', '1');
$handler->override_option('style_plugin', 'bulk');
$handler->override_option('style_options', array(
  'grouping' => '',
  'override' => 1,
  'sticky' => 0,
  'order' => 'asc',
  'columns' => array(
    'title' => 'title',
    'field_plaats_value' => 'field_plaats_value',
    'field_vacature_type_value' => 'field_vacature_type_value',
    'field_eventuele_looptijd_value' => 'field_eventuele_looptijd_value',
    'field_publicatiedatum_value' => 'field_publicatiedatum_value',
    'field_publicatiedatum_value2' => 'field_publicatiedatum_value2',
    'delete_node' => 'delete_node',
  ),
  'info' => array(
    'title' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'field_plaats_value' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'field_vacature_type_value' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'field_eventuele_looptijd_value' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'field_publicatiedatum_value' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'field_publicatiedatum_value2' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'delete_node' => array(
      'separator' => '',
    ),
  ),
  'default' => 'field_publicatiedatum_value',
  'execution_type' => '1',
  'display_type' => '0',
  'hide_select_all' => 0,
  'skip_confirmation' => 0,
  'display_result' => 1,
  'merge_single_action' => 1,
  'selected_operations' => array(
    'views_bulk_operations_delete_node_action' => 'views_bulk_operations_delete_node_action',
    'node_mass_update:a27b9efabcd054685a549378b174ad11' => 0,
    'node_mass_update:14de7d028b4bffdf2b4a266562ca18ac' => 0,
    'og_add_group_action' => 0,
    'system_message_action' => 0,
    'node_save_action' => 0,
    'node_publish_action' => 0,
    'system_send_email_action' => 0,
    'views_bulk_operations_action' => 0,
    'views_bulk_operations_script_action' => 0,
    'node_promote_action' => 0,
    'og_make_private_action' => 0,
    'og_make_public_action' => 0,
    'views_bulk_operations_fields_action' => 0,
    'views_bulk_operations_taxonomy_action' => 0,
    'views_bulk_operations_argument_selector_action' => 0,
    'node_make_sticky_action' => 0,
    'node_make_unsticky_action' => 0,
    'node_mass_update:0ccad85c1ebe4c9ceada1aa64293b080' => 0,
    'node_unpublish_action' => 0,
    'node_mass_update:9c585624b9b3af0b4687d5f97f35e047' => 0,
    'og_remove_groups_action' => 0,
    'og_remove_group_action' => 0,
    'node_unpublish_by_keyword_action' => 0,
    'pathauto_node_update_alias_multiple:620e193b20ba9caa374fea9ca0ad38f0' => 0,
    'node_mass_update:c4d3b28efb86fd703619a50b74d43794' => 0,
    'node_mass_update:8ce21b08bb8e773d10018b484fe4815e' => 0,
    'node_unpromote_action' => 0,
    'system_goto_action' => 0,
    'node_assign_owner_action' => 0,
  ),
  'labels' => array(
    'node_mass_update:a27b9efabcd054685a549378b174ad11' => '',
    'node_mass_update:14de7d028b4bffdf2b4a266562ca18ac' => '',
    'og_add_group_action' => '',
    'system_message_action' => '',
    'node_save_action' => '',
    'node_publish_action' => '',
    'views_bulk_operations_delete_node_action' => '',
    'system_send_email_action' => '',
    'views_bulk_operations_action' => '',
    'views_bulk_operations_script_action' => '',
    'node_promote_action' => '',
    'og_make_private_action' => '',
    'og_make_public_action' => '',
    'views_bulk_operations_fields_action' => '',
    'views_bulk_operations_taxonomy_action' => '',
    'views_bulk_operations_argument_selector_action' => '',
    'node_make_sticky_action' => '',
    'node_make_unsticky_action' => '',
    'node_mass_update:0ccad85c1ebe4c9ceada1aa64293b080' => '',
    'node_unpublish_action' => '',
    'node_mass_update:9c585624b9b3af0b4687d5f97f35e047' => '',
    'og_remove_groups_action' => '',
    'og_remove_group_action' => '',
    'node_unpublish_by_keyword_action' => '',
    'pathauto_node_update_alias_multiple:620e193b20ba9caa374fea9ca0ad38f0' => '',
    'node_mass_update:c4d3b28efb86fd703619a50b74d43794' => '',
    'node_mass_update:8ce21b08bb8e773d10018b484fe4815e' => '',
    'node_unpromote_action' => '',
    'system_goto_action' => '',
    'node_assign_owner_action' => '',
  ),
  'views_bulk_operations_fields_action' => array(
    'php_code' => 0,
    'show_tokens' => 0,
    'display_fields' => array(
      '_all_' => '_all_',
    ),
  ),
));
$handler = $view->new_display('page', 'Pagina', 'page_2');
$handler->override_option('path', 'alumni/vacatures_onderhoud');
$handler->override_option('menu', array(
  'type' => 'normal',
  'title' => 'vacatures onderhoud',
  'description' => '',
  'weight' => '0',
  'name' => 'menu-secipvk',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
  'name' => 'navigation',
));
ikeigenwijs’s picture

dev output:
#
Krumo version 0.2a
| http://krumo.sourceforge.net
Called from /www/_shares/_revaki/WWW/sites/all/modules/views_bulk_operations/views_bulk_operations.module, line 376

I copied the whole html to be complete:

<div class="messages status">
<!-- Using Krumo Skin: skins/default/skin.css -->
<style type="text/css">
&lt;!--/**/
/**
* Krumo Default Skin
*
* @version $Id: skin.css,v 1.1.2.2 2008/06/03 20:36:05 weitzman Exp $
* @author Kaloyan K. Tsvetkov &lt;mrasnika@users.sourceforge.net&gt;
*/

/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */

ul.krumo-node {
	margin: 0px;
	padding: 0px;
	}
ul.krumo-node ul {
	margin-left: 20px;
	}
* html ul.krumo-node ul {
	margin-left: 24px;
	}
div.krumo-root {
	border: solid 1px black;
	margin: 1em 0em;
	}
ul.krumo-first {
	font: normal 12px arial;
	border: solid 2px white;
	border-top-width:1px;
	background: url(/sites/all/modules/devel/krumo/skins/default/bg.gif);
	}

/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */

li.krumo-child {
	display:block;
	list-style: none;
	padding: 0px;
	margin: 0px;
	overflow:hidden;
	}
div.krumo-element {
	cursor:default;

	line-height: 24px;
	display:block;
	
	clear:both;
	white-space:nowrap;
	
	border-top: solid 1px white;
	background: #E8E8E8;
	padding-left: 10px;
	}
* html div.krumo-element {
	padding-bottom: 3px;
	}
a.krumo-name {
	color:#2C5858;
	font: bold 13px Arial;
	}
a.krumo-name big {
	font: bold 20pt Georgia;
	line-height: 14px;
	position:relative;
	top:2px;
	left:-2px;
	}
* html a.krumo-name big {
	font: bold 19pt Georgia;
	top: 5px;
	left: 0px;
	line-height: 9px;
	height: 12px;
	padding: 0px;
	margin: 0px;
	}
div.krumo-expand {
	background: #CCCCCC;
	cursor:pointer;
	}
div.krumo-hover {
	background: #B7DBDB;
	}

/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */

div.krumo-preview {
	font: normal 13px courier new;
	padding: 5px 5px 14px 5px;
	background: white;
	border-top: 0px;
	overflow:auto;
	}
* html div.krumo-preview {
	padding-top: 2px;
	}

/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */

li.krumo-footnote {
	background:white;
	padding: 2px 5px;
	list-style:none;
	border-top: solid 1px #bebebe;
	margin-top:2px;
	cursor:default;
	}
* html li.krumo-footnote {
	line-height: 13px;
	}
div.krumo-version {
	float:right;
	}
li.krumo-footnote h6 {
	font: bold 11px verdana;
	margin: 0px;
	padding: 0px;
	color:#366D6D;
	display:inline;
	}
* html li.krumo-footnote h6 {
	margin-right: 3px;
	}
li.krumo-footnote a {
	font: bold 10px arial;
	color: #434343;
	text-decoration:none;
	}
li.krumo-footnote a:hover {
	color:black;
	}

li.krumo-footnote span.krumo-call {
	font:normal 11px verdana;
	position: relative;
	top: 1px;
	}
li.krumo-footnote span.krumo-call code {
	font-weight:bold;
	}

/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */

div.krumo-title {
	font: normal 11px verdana ;
	position:relative;
	top:9px;
	cursor:default;
	line-height:2px;
	}

/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */

strong.krumo-array-length,
strong.krumo-string-length {
	font-weight: normal;
	}

/* -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- */

/**/--&gt;
</style>
<script type="text/javascript">
&lt;!--//
/**
* JavaScript routines for Krumo
*
* @version $Id: krumo.js,v 1.1.2.2 2008/06/03 20:36:03 weitzman Exp $
* @link http://sourceforge.net/projects/krumo
*/

/////////////////////////////////////////////////////////////////////////////

/**
* Krumo JS Class
*/
function krumo() {
	}

// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

/**
* Add a CSS class to an HTML element
*
* @param HtmlElement el 
* @param string className 
* @return void
*/
krumo.reclass = function(el, className) {
	if (el.className.indexOf(className) &lt; 0) {
		el.className += (' ' + className);
		}
	}

// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

/**
* Remove a CSS class to an HTML element
*
* @param HtmlElement el 
* @param string className 
* @return void
*/
krumo.unclass = function(el, className) {
	if (el.className.indexOf(className) &gt; -1) {
		el.className = el.className.replace(className, '');
		}
	}

// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

/**
* Toggle the nodes connected to an HTML element
*
* @param HtmlElement el 
* @return void
*/
krumo.toggle = function(el) {
	var ul = el.parentNode.getElementsByTagName('ul');
	for (var i=0; i&lt;ul.length; i++) {
		if (ul[i].parentNode.parentNode == el.parentNode) {
			ul[i].parentNode.style.display = (ul[i].parentNode.style.display == 'none')
				? 'block'
				: 'none';
			}
		}

	// toggle class
	//
	if (ul[0].parentNode.style.display == 'block') {
		krumo.reclass(el, 'krumo-opened');
		} else {
		krumo.unclass(el, 'krumo-opened');
		}
	}

// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

/**
* Hover over an HTML element
*
* @param HtmlElement el 
* @return void
*/
krumo.over = function(el) {
	krumo.reclass(el, 'krumo-hover');
	}

// -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

/**
* Hover out an HTML element
*
* @param HtmlElement el 
* @return void
*/

krumo.out = function(el) {
	krumo.unclass(el, 'krumo-hover');
	}
	
/////////////////////////////////////////////////////////////////////////////
//--&gt;
</script>
<div dir="ltr" class="krumo-root">
	<ul class="krumo-node krumo-first">
		<li class="krumo-child">
	
	<div onmouseout="krumo.out(this);" onmouseover="krumo.over(this);" class="krumo-element                    ">
		
			<a class="krumo-name">...</a>
			(<em class="krumo-type">Array, <strong class="krumo-array-length">0 elements</strong></em>) 
			
				
							
	</div>

	</li>
		<li class="krumo-footnote">
			<div style="white-space: nowrap;" class="krumo-version">
				<h6>Krumo version 0.2a</h6> | <a target="_blank" href="http://krumo.sourceforge.net">http://krumo.sourceforge.net</a>
			</div>
		
				<span style="white-space: nowrap;" class="krumo-call">
			Called from <code>/www/_shares/_revaki/WWW/sites/all/modules/views_bulk_operations/views_bulk_operations.module

,
line 376
 

Encarte’s picture

subscribing

ikeigenwijs’s picture

is the view correct?

infojunkie’s picture

@ikeigenwijs, I can't rebuild the view because there are custom CCK fields. It would be more useful to create a simple view with just core fields. Thanks!

Can you turn clean URLs on and check if there's a difference?

ikeigenwijs’s picture

No i cant turn clean url's on, its not supported on this server, i ll make a view with only core fields.

jjwhitney’s picture

I'm running into this problem, too. The patch in #2 helps, but having any Views Custom Fields in the view also causes the same issue. This is caused by the fact that the extra fields show up in views_node_selector_process(), but not in _views_bulk_operations_adjust_selection(). Maybe it's just too dangerous to rely on hashes of the field results?

infojunkie’s picture

Thanks all for your feedback. Good point about the hash being unreliable. I guess it would be a matter of catching the result set at the same state in all cases, in order to ensure consistency.

The main problem is that I can't rely on the node nid (if we're talking about a node view) because there might be multiple records with the same nid. So I'm looking for a reliable way to uniquely identify a record.

Another approach would be to store the selected records in form storage as it goes through the multiple steps. Maybe I should investigate in this direction.

jjwhitney’s picture

Thanks, infojunkie, for your thoughts on this issue. If/When you take another shot at a fix, it'd be fantastic if you also look at selecting items in "Merge single action's form with node selection view" mode, which also seems to be broken. (I'm pretty sure it's a separate issue though.) In this mode, using the pager clears out any checkboxes for selected items. (Note that the items are still selected "behind the scenes", but the checkboxes do not reflect this.)

infojunkie’s picture

Status: Active » Needs review

Please try the latest dev (12 hours from now). I've added a call to the pre_render functions in _views_bulk_operations_adjust_selection to get the same results as during the rendering process. Does this make a difference?

jjwhitney’s picture

Status: Needs review » Needs work

It's better (no more issues with Views Custom Field), but the problem with date fields as described in comment #2 hasn't gone away. For the time being, I'm just using the patch there to get around the problem.

infojunkie’s picture

Thanks jjwhitney for your reply. I've actually completely changed the selection mechanism, I'll be checking in the new code soon.

digi24’s picture

Thanks infojunkie, the latest dev code works for me too.

I still hope, that VBO might reintroduce the possibility to (optionally) base the selection on the entity-ids on submit. I have some views with frequently changing results that (correctly) do not execute, when the result hash has changed in the meantime, but where the selection at submit would still be desired. This becomes mainly visible when using VBO with apachesolr.

gnindl’s picture

Confirm comment #17. I also noticed that the new selection mechanism is slower.

infojunkie’s picture

The new selection code that I will push next week only stores the results once - no need to requery the view at all. I am hoping this solves the problem permanently. Thanks for everyone's patience.

infojunkie’s picture

Status: Needs work » Needs review

Please test the latest dev as the selection code was completely changed. The initial view results are cached to avoid re-executing the view. This change should resolve the current issue.

digi24’s picture

Was http://drupalcode.org/project/views_bulk_operations.git/commit/8e046e4 the relevant commit?

I have been using this and I am still having some issues either from the Batch processing or from some exposed filters. But they may be specific to my installation, so I am trying to hunt it down myself.

infojunkie’s picture

@digi24: yes, that's the one. Please post scenarios where selection fails - using only core Drupal data if possible. Thanks!

naero’s picture

I'm having the same issue, but with a Term view. Also, I can't apply the patch from #2 to the latest dev version (as of today).

infojunkie’s picture

@naero: no need to apply patch #2, the code is now different but the issue should be fixed. Please include a scenario to reproduce your problem, ideally only using core Drupal data.

digi24’s picture

Regarding my feedback in #23, I have isolated my issue not to be related directly to this fix. The selection works for me using drupal core data.

infojunkie’s picture

Status: Needs review » Fixed

The problem still persisted even after the new selection code. Even though the results are now cached by VBO, the Date CCK field still preprocesses its information *after* the VBO style plugin, leading to the same issue. I committed the patch in #2.

Anonymous’s picture

Status: Fixed » Active

I've tryed to update views_bulk_operations-6.x-1.x-dev.tar today version, during the process I got following error

warning: array_merge() [function.array-merge]: Argument #2 is not an array in /update.php on line 173.
warning: Invalid argument supplied for foreach() in update.php on line 337.

Than I also got following error while I was browsing a views_bulk_operations page:
warning: implode() [function.implode]: Invalid arguments passed in /includes/form.inc on line 838.

There are no cck date field in that view.

[referenced to http://drupal.org/node/1183522#comment-4586720]

infojunkie’s picture

@giorez: I fixed the update problem - thanks.

Regarding the VBO page warning: Does it prevent the selection from working correctly?

Anonymous’s picture

the selection works properly, but the error is printed for each row

infojunkie’s picture

Status: Active » Fixed

What you're witnessing is not necessarily related to the selection issue at all. I'm marking this issue as fixed and feel free to open a new one for the warnings. But I will ask you for a detailed description on how to reproduce them, because I haven't seen those warnings with the default content admin VBO.

Anonymous’s picture

Status: Fixed » Active

sorry for reopening but I double checked also with git version. The update proccess from 6.x-1.10 to 6.x-1.x-dev has been fixed, but I still got following errors:

No row selected. Please select one or more rows.
warning: implode() [function.implode]: Invalid arguments passed in /includes/form.inc on line 838.

I hope this help

infojunkie’s picture

@giorez, I need more information about the view you're using:

* Dump the view
* Module versions: Views, any CCK fields, etc.

Anonymous’s picture

StatusFileSize
new134.71 KB

Views 6.x-3.x-dev (2011-Jun-10)
Content Construction Kit (CCK) 6.x-2.9
Views Bonus Pack 6.x-1.1
Views Custom Field 6.x-1.x-dev (2011-Feb-25)
Content Profile 6.x-1.0

infojunkie’s picture

Thanks, I reproduced it. Working on it now.

infojunkie’s picture

Views Custom Field has been superseded by Views PHP, which contains more mature code and supports the latest Views + VBO versions. Migrating to Views PHP should be as easy as replacing the fields and copying the code. I encourage you to migrate, because Views Custom Field will be marked as obsolete very soon. Please let me know how it goes.

Anonymous’s picture

I replaced Views Custom Field with Views PHP, and the issue has gone away in the views attached at #35

On the views I'm attaching right now, I still have two errors:
-No row selected. Please select one or more rows.
-warning: implode() [function.implode]: Invalid arguments passed in /includes/form.inc on line 838.

Thanks a lot for your support!
PS When I send bulk sms I still have an issue as explained at http://drupal.org/node/1150180

Anonymous’s picture

StatusFileSize
new40.47 KB
infojunkie’s picture

@giorez, I can't figure out which field is causing the problem. Can you please remove them one by one, starting with the non-core fields, and see which one is causing it?

Anonymous’s picture

it seems to be related to the field

Node: New comments
The number of new comments on the node.

I hope this helps.

infojunkie’s picture

Status: Active » Postponed

I've submitted a patch that applies to all versions of Views and that solves these problems: #1186272: Reorder pre_render calls. Until that patch is committed or rejected, I am postponing this issue. I encourage concerned parties to vote for that patch.

Anonymous’s picture

Status: Postponed » Closed (fixed)

since views 6.x-3.x-dev2011Jul21 the issue is disappeared

lunk rat’s picture

Status: Closed (fixed) » Active

I am using views 6.x-2.16 and VBO 6.x-1.12 and I spotted this issue ONLY when I have an exposed filter on an integer field with "Is between" operator.

My view is simple as can be: just title field and a few exposed filters.

When the exposed operator is anything other than "Is between" the issue does not appear.

infojunkie’s picture

Status: Active » Closed (fixed)

Closing this old issue - please follow #1370806: Enabling Persist selection yields 0 rows selected or open a new one if your scenario is different.