Problem/Motivation

If the "Select / deselect all results in this view (all pages, n total)" checkbox is used, then the confirmation page will show "No Items selected", "No items". All items are in fact selected, and when proceeding, it appears to process it correctly.

If the checkbox in the column header is used (selecting only those items on the page), then everything appears to work OK, this issue doesn't happen.

This problem is unnerving for users, because it appears that nothing will happen when the bulk operation is started, even though that is not the case.

Steps to reproduce

Create a new VBO view (I am using a users view), use the VBO example action as the action, and select a couple of user fields to display the table. Display output as a table, using a pager. Then check the select all results in this view/all pages checkbox, and the confirmation screen will show, showing no items selected.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sgjohnston created an issue. See original summary.

jacktonkin made their first commit to this issue’s fork.

jacktonkin’s picture

I think this is due to two instances of the same bug:

  1. The list title is always set to 'No items selected.' when there are no items for inclusion or exclusion
  2. The exclude_mode key in the temp store is set to FALSE when the select all checkbox is checked but there are no items to exclude

It looks like the meaning of exclude_mode may have changed subtly due to refactoring? Setting it to TRUE for the case where all items are selected works in my testing.

jacktonkin’s picture

Status: Active » Needs review

Still getting the hang of MR workflow. Setting to 'Needs review'.

I'm also not a huge fan of both the list title and empty text saying 'All items'/'No items' but that may be out of scope here?

jacktonkin’s picture

I've added a new key in the temp store which reflects the status of the 'select all' checkbox, as otherwise all selected looks the same on the configuration and confirmation forms as none selected does during AJAX callbacks on the view form. Tests pass now so actually ready for review!

  • Graber committed dd6fac6 on 8.x-3.x
    Issue #3211977 by jacktonkin: Selecting all items on all pages results...
graber’s picture

Status: Needs review » Fixed

Thanks for reporting this and working on it, I found a way to handle it without introducing that extra parameter, please check and reopen if not actually fixed.

graber’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.