I created a simple one-column non-Ajax view of nodes filtering by one content type I needed to delete, setting the VBO style, but whatever way I configured it the 'select all' button did not show in the view!

What was driving me particularly crazy was the fact that Views2 live preview does show this button, but not when I go to the actual view. Tried really everything.

Also tried the current (Aug 4) dev version - no luck. I am sure it's a bug.

(Luckily I found your demo content management at /admin/content/node2 ... that one does show the button so my immediate problem is solved, but the above needs to be looked at.)

CommentFileSizeAuthor
#24 VBO preview.png17.78 KBLetharion
#24 VBO Live.png61.07 KBLetharion

Comments

vacilando’s picture

I was too fast.. /admin/content/node2 does not solve my immediate problem either because it apparently does not have the batch functionality switched on. (Can it be set on?)

infojunkie’s picture

With the demo VBO, what is the problem that you encounter? Are you referring to the ability to select all nodes across all pages, or the ability to use the Batch API to process your nodes? Please explain in detail what you expect versus what you see. Thanks.

vacilando’s picture

Thanks so much for getting back on this kratib.

Yes, in fact there are two issues here.

1) 'select all' button available on views preview but not when the view is accessed on its path

2) the demo account has the 'select all' button but does not have batch processing on, so it is not able to delete the 30k nodes I have in a content type.

Quick help on how to tweak at least the 2nd to get it to work using batch processing would be extremely helpful... thanks!
(I tried to change 'execution_type' => '1' to 'execution_type' => '2' in views_bulk_operations.views_default.inc but that did not do the trick.)

vacilando’s picture

Version: 6.x-1.7 » 6.x-1.x-dev

To be absolutely precise, (2) was only tested on the dev version, so I adapt the issue status here.

infojunkie’s picture

Concerning (2), do you mean that the VBO style settings do not show the Batch API option?

infojunkie’s picture

Concerning (1), make sure your view has a pager because otherwise the Select All button will not appear.

vacilando’s picture

(1) Pager has been on. Tried with or without AJAX. The select all button shows in live preview in views, but not on the view's link.

(2) I speak about the demo page /admin/content/node2 -- I don't see where I could set Batch API for that.

Please let me know if anything remains unclear. I am happy to clarify and help testing.

infojunkie’s picture

(2) Edit the view, click the "Bulk Operations" settings (gear) icon. Choose "To execute operations" > "Use Batch API".

vacilando’s picture

Ahh.. I did not realize I could change the default view in the same time. So (2) works fine - thanks! Only (1) remains as a problem now.

sja1’s picture

I have the same problem. The select all button shows up in the live preview, but not on the view's live page. I've exported the view and posted the code below.

Any suggestions greatly appreciated!

$view = new view;
$view->name = 'Usuarios';
$view->description = 'Usuarios';
$view->tag = 'Usuarios';
$view->view_php = '';
$view->base_table = 'users';
$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(
  'content_profile_rel' => array(
    'label' => 'Content Profile',
    'required' => 0,
    'type' => 'profile',
    'id' => 'content_profile_rel',
    'table' => 'users',
    'field' => 'content_profile_rel',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
));
$handler->override_option('fields', array(
  'mail' => array(
    'label' => 'Correo electrónco',
    '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_user' => 'mailto',
    'exclude' => 0,
    'id' => 'mail',
    'table' => 'users',
    'field' => 'mail',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'name' => array(
    'label' => 'Nombre',
    '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_user' => 1,
    'overwrite_anonymous' => 0,
    'anonymous_text' => '',
    'exclude' => 0,
    'id' => 'name',
    'table' => 'users',
    'field' => 'name',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'rid' => array(
    'label' => 'Roles',
    '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,
    ),
    'type' => 'separator',
    'separator' => ', ',
    'empty' => '',
    'exclude' => 0,
    'id' => 'rid',
    'table' => 'users_roles',
    'field' => 'rid',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'uid' => array(
    'label' => 'Uid',
    '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_user' => 0,
    'exclude' => 0,
    'id' => 'uid',
    'table' => 'users',
    'field' => 'uid',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
  ),
  'field_nombre_1_value' => array(
    'label' => 'Nombre real',
    '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,
    'label_type' => 'custom',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_nombre_1_value',
    'table' => 'node_data_field_nombre_1',
    'field' => 'field_nombre_1_value',
    'relationship' => 'content_profile_rel',
    'override' => array(
      'button' => 'Override',
    ),
  ),
  'field_primer_apellido_value' => array(
    'label' => 'Primer apellido',
    '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,
    'label_type' => 'widget',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_primer_apellido_value',
    'table' => 'node_data_field_primer_apellido',
    'field' => 'field_primer_apellido_value',
    'relationship' => 'content_profile_rel',
  ),
  'field_sex_value' => array(
    'label' => 'Soy',
    '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,
    'label_type' => 'widget',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_sex_value',
    'table' => 'node_data_field_sex',
    'field' => 'field_sex_value',
    'relationship' => 'content_profile_rel',
  ),
  'field_cuando_terminas_value' => array(
    'label' => '¿Cuándo terminas bachillerato o FP?',
    '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,
    'label_type' => 'widget',
    'format' => 'default',
    'multiple' => array(
      'group' => TRUE,
      'multiple_number' => '',
      'multiple_from' => '',
      'multiple_reversed' => FALSE,
    ),
    'exclude' => 0,
    'id' => 'field_cuando_terminas_value',
    'table' => 'node_data_field_cuando_terminas',
    'field' => 'field_cuando_terminas_value',
    'relationship' => 'content_profile_rel',
  ),
  'tid' => array(
    'label' => 'All terms',
    '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,
    ),
    'type' => 'separator',
    'separator' => ', ',
    'empty' => '',
    'link_to_taxonomy' => 1,
    'limit' => 1,
    'vids' => array(
      '11' => 11,
      '8' => 0,
      '3' => 0,
      '7' => 0,
      '9' => 0,
      '5' => 0,
      '10' => 0,
      '12' => 0,
      '1' => 0,
      '6' => 0,
      '4' => 0,
    ),
    'exclude' => 0,
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'relationship' => 'content_profile_rel',
  ),
));
$handler->override_option('filters', array(
  'tid' => array(
    'operator' => 'or',
    'value' => array(
      '0' => '249',
    ),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'tid_op',
      'identifier' => 'tid',
      'label' => 'País',
      'optional' => 1,
      'single' => 0,
      'remember' => 0,
    ),
    'type' => 'textfield',
    'limit' => TRUE,
    'vid' => '11',
    'id' => 'tid',
    'table' => 'term_node',
    'field' => 'tid',
    'hierarchy' => 0,
    'relationship' => 'content_profile_rel',
    'override' => array(
      'button' => 'Override',
    ),
    'reduce_duplicates' => 0,
  ),
  'field_cuando_terminas_value' => array(
    'operator' => '=',
    'value' => '',
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 0,
      'operator' => 'field_cuando_terminas_value_op',
      'identifier' => 'field_cuando_terminas_value',
      'label' => 'Termina Bachillerato',
      'optional' => 1,
      'remember' => 0,
    ),
    'case' => 0,
    'id' => 'field_cuando_terminas_value',
    'table' => 'node_data_field_cuando_terminas',
    'field' => 'field_cuando_terminas_value',
    'relationship' => 'content_profile_rel',
    'override' => array(
      'button' => 'Override',
    ),
  ),
  'rid' => array(
    'operator' => 'or',
    'value' => array(),
    'group' => '0',
    'exposed' => TRUE,
    'expose' => array(
      'use_operator' => 1,
      'operator' => 'rid_op',
      'identifier' => 'rid',
      'label' => 'Usuario: Roles',
      'optional' => 1,
      'single' => 0,
      'remember' => 0,
      'reduce' => 0,
    ),
    'id' => 'rid',
    'table' => 'users_roles',
    'field' => 'rid',
    'override' => array(
      'button' => 'Override',
    ),
    'relationship' => 'none',
    'reduce_duplicates' => 0,
  ),
));
$handler->override_option('access', array(
  'type' => 'none',
));
$handler->override_option('cache', array(
  'type' => 'none',
));
$handler->override_option('items_per_page', 50);
$handler->override_option('use_pager', '1');
$handler->override_option('use_more', 1);
$handler->override_option('use_more_text', 'más');
$handler->override_option('style_plugin', 'bulk');
$handler->override_option('style_options', array(
  'grouping' => '',
  'override' => 1,
  'sticky' => 1,
  'order' => 'asc',
  'columns' => array(
    'mail' => 'mail',
    'name' => 'name',
    'rid' => 'rid',
    'uid' => 'uid',
    'field_nombre_1_value' => 'field_nombre_1_value',
    'field_primer_apellido_value' => 'field_primer_apellido_value',
    'field_sex_value' => 'field_sex_value',
    'field_cuando_terminas_value' => 'field_cuando_terminas_value',
    'tid' => 'tid',
  ),
  'info' => array(
    'mail' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'name' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'rid' => array(
      'separator' => '',
    ),
    'uid' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'field_nombre_1_value' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'field_primer_apellido_value' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'field_sex_value' => array(
      'sortable' => 0,
      'separator' => '',
    ),
    'field_cuando_terminas_value' => array(
      'sortable' => 1,
      'separator' => '',
    ),
    'tid' => array(
      'separator' => '',
    ),
  ),
  'default' => 'name',
  'execution_type' => '1',
  'display_type' => '0',
  'skip_confirmation' => 0,
  'display_result' => 1,
  'merge_single_action' => 1,
  'selected_operations' => array(
    '4fff50383fdc48042390841723c0d719' => '4fff50383fdc48042390841723c0d719',
    'a011c04389ff75f79af39bb612089bca' => 'a011c04389ff75f79af39bb612089bca',
    'feb13e750bd2575b1f36109233087905' => 'feb13e750bd2575b1f36109233087905',
    'df39f786ee434ca702b268783466a7ab' => 'df39f786ee434ca702b268783466a7ab',
    '73e0815d78610c8e7538ec8c5ad0be0c' => '73e0815d78610c8e7538ec8c5ad0be0c',
    '2178a36c0b51f3a7ea1d854780e33cc5' => '2178a36c0b51f3a7ea1d854780e33cc5',
    '4bd509ad947296ffe30e8092a438e096' => '4bd509ad947296ffe30e8092a438e096',
    'dfdea479cc7ae8cb9d3e8749e57f86b4' => 0,
    '4d075a755ad70f936bf89570e66196f1' => 0,
    '132fddcb3f367a243bee632db31985c1' => 0,
    'daa75f478e3093ab107e657da6620a91' => 0,
    '334d20af1ae7ac4b770b7ec3210b2638' => 0,
    '246fdc2a4672eb371d05b48b2a7cb51e' => 0,
    '52aec7fee2070ce530da1304653ae1ec' => 0,
  ),
));
$handler = $view->new_display('page', 'Página', 'page_1');
$handler->override_option('path', 'usuarios_admin');
$handler->override_option('menu', array(
  'type' => 'normal',
  'title' => 'Administrar Usuarios',
  'description' => 'Permite realizar operaciones masivas sobre los usuarios',
  'weight' => '0',
  'name' => 'navigation',
));
$handler->override_option('tab_options', array(
  'type' => 'none',
  'title' => '',
  'description' => '',
  'weight' => 0,
));
sja1’s picture

Version: 6.x-1.x-dev » 6.x-1.9
Component: Code » User interface

Still having this problem. Any suggestions welcome! thanks

infojunkie’s picture

Sorry I haven't gone back to this issue. I'll address it after I get back from vacation, one week from now - along with my full issue backlog. Thanks for your patience.

sja1’s picture

Thanks, I appreciate the time you put into this. If it helps at all, I created a copy of the website having this problem (same dedicated server, different domain), and on the copy the problem doesn't manifest itself... very strange. Looking at the source code generated, in firebug I do notice a difference in the html shown before before clicking any text boxes.

If I just use the "show source" option on my browser, both sites show the following line, with no differences between them:

<tr class="odd"><td class="view-field view-field-select-all" colspan="5"><span id="vbo-this-page">All <strong>100</strong> rows in this página are selected.&nbsp;<input type="button" id="vbo-select-all-pages" value="Select all 13702 rows in this view." /></span><span id="vbo-all-pages" style="display: none">All <strong>13702</strong> rows in this view are selected.&nbsp;<input type="button" id="vbo-select-this-page" value="Select only 100 rows in this página." /></span></td> </tr>

However, if I use Firebug to inspect the html, I see that on the copy in which the "select all" button works, the TR has an additional attribute:
style = "display: none;"

I can also see that in the source html of the site with the problem hat the button definitions are in the HTML, but the button just doesn't seem to be made visible when the select all check box is marked.

Could this possibly point to an issue involving javascript? Unfortunately, I don't know javascript, but it seems like its a javascript action that isn't executing (assuming javascript is what is used to make the button appear).

druplicate’s picture

It's not obvious but the first check box in the left column is the select-all check box and when checked it activates the other button. It's just missing the "select all" label.

infojunkie’s picture

@sja1, does druplicate's comment apply to you?

sja1’s picture

I don't think so. I click that checkbox, all the rows gets selected that are visible on the current page, but the "select all" button never appears to allow me to expand the selection to all the rows that are on subsequent result pages.

grahamu’s picture

This issue is also affecting me, subscribing.

cindyr’s picture

Re #15 - any patch for putting the "Select All" label back in? Looks like the problem is somewhere in here, but I haven't a clue how to fix it:

views_bulk_operations.js

  var strings = { 'selectAll': Drupal.t('Select all rows in this table'), 'selectNone': Drupal.t('Deselect all rows in this table') };
  var updateSelectAll = function(state) {
    $('th.select-all input:checkbox', table).each(function() {
      $(this).attr('title', state ? strings.selectNone : strings.selectAll);
      this.checked = state;
      setSelectAll($('input#edit-objects-select-all', form).val() == 1);
    });
  };
summit’s picture

Subscribing, greetings, Martijn

infojunkie’s picture

Version: 6.x-1.9 » 6.x-1.10-beta1

To all posters: please upgrade to 1.10-beta1. Is there any change?

If not, please install the Firebug extension on Firefox and do the following:
* Open the Firebug console
* Click the Console tab in Firebug
* Navigate to your VBO that exhibits the problem
=> Is there any Javascript error that is displayed?

Also, please attach a screenshot of what you see to help me visualize the problem. Thanks!

Useful Idiot’s picture

Version: 6.x-1.10-beta1 » 6.x-1.10-beta2

I am having the same problem, the select all rows does not work for me. I opened firebug and clicked console, there are no javascript errors reporting.

verta’s picture

Subscribing.

Letharion’s picture

Version: 6.x-1.10-beta2 » 6.x-1.10
StatusFileSize
new61.07 KB
new17.78 KB

I have the same issue. Neither the select all checkbox, nor the select all pages button appear for me.
They are both in the source code, but neither is displayed. I tried manipulating the CSS in Firebug as a workaround, but that doesn't help, which is very strange in itself.
I thought it was a theme issue, so I went back to Garland, didn't make any difference.
While I have no JS errors in the error console, I tried disabling JS, still no effect.
Generally fiddled back and forth with pager/ajax/number of items, mainly in a random fashion, can't get anywhere.
Same issue in both Firefox 3.6 and Chromium 9.

Attaching two screenshots that hopefully makes the problem clear, if it's not already.

Letharion’s picture

I looked around some more, and I found both the div holding the checkbox and the button hidden behind the administrator menu (http://drupal.org/project/admin_menu). This despite me being on the "top" of the page.

I'll check if this is repeatable later, but wanted to write this down straight, in case I forget about it.

Letharion’s picture

#25 isn't reproducible unfortunately.

Current, and repeatable situation.
The "checkbox" and button are both hidden by "display: none".
If I fix this with Firebug, then I get the text "All N rows in this page are selected", but they are not selected.
The button shows up, but doesn't work.

Letharion’s picture

And all of a sudden, the problem is gone.

I wish I could say what changed, but I don't know.

giorgio79’s picture

Try clearing cache.
That solved the issue for me. Whenever there is an update to VBO or a change in the view, the cache can bork it for you :)

bojanz’s picture

Status: Active » Closed (works as designed)

Reopen if you can still reproduce this with 6.x-1.x-dev (which changed the way it does select all compared to 6.x-1.10)

vchen’s picture

Version: 6.x-1.10 » 7.x-3.1
Priority: Normal » Major

It's been over 3 years since this original post, and I'm using 7.x-3.1 and I'm still having this problem. The preview for select all on all pages looks like it works as it should, however, once you go to the actual view, I can't click on the select all button. Sometimes it shows up, sometimes it's hidden. When it's there, I can't get it to even click.

One time I was able to click on it, but with the help of Firebug, but even then it doesn't do what it's supposed to...select all.

Any developments on this issue??

ressa’s picture

I can access the "select all" checkbox via /admin/content/node2, but not via a custom view.

Yorgg’s picture

Issue summary: View changes

In my case, I can only see this the checkbox in the view's preview.
Tested with jQuery 1.4, 1.5 and 1.7
The view was left untouched.

washburn’s picture

For my missing "Select all" checkbox - It was working in the Dev environment but not on Test or Prod.
The difference was the version of jquery I was using for the theme. I changed it through jquery update configuration and the checkbox now appears.