I'm using VBO in my site and I have this view using pager: paged output, full pager.

When I do the select all on the UI it seems to work fine, but when I do the execute it only execute for the number I have on the screen.

Debuggin all around I notice that in the method _views_bulk_operations_get_selection_full it does set
$view_copy->set_items_per_page(0);
But when it comes to the pager (views_plugin_pager_full.inc) to the query() method it first checks for
$_GET['items_per_page']
Then it limits back to what the page is limiting for display.
My guess is that this should actually be limited on the pager, and is a bug on the pager.
Right now to try to have the minimum impact in the code what I did was to unset the get parameter in the _views_bulk_operations_get_selection_full just below where it sets the items per page variable:

    $view_copy->set_arguments($view->args);
    $view_copy->set_items_per_page(0);
    unset($_GET['items_per_page']); // ADDED THIS LINE
    $view_copy->skip_render = TRUE; // signal our plugin to skip the rendering   

This is working right now, but I think there should be a better fix.

~Nestor

Comments

infojunkie’s picture

Assigned: Unassigned » infojunkie

Thanks for the report. I'll try to reproduce this. Which version of Views are you using?

infojunkie’s picture

I checked the code of views_plugin_pager_full.inc (latest Views-6.x-3.x) and it seems that $_GET['items_per_page'] is only used when the "items per page" control is exposed. Is that the case in your view?

nestor.mata’s picture

Hi,

I'm using version 6.x-1.13.
And we are exposing the "items per page" control.
I hope this helps.

Thanks,
Nestor

infojunkie’s picture

Title: The select all not working, only execute for the first N that shows on screen » Exposed "Items per page" control breaks VBO

Thanks. I'll be testing with this configuration.