Problem/Motivation

Select/deselect all results in this view does nothing

Steps to reproduce

  • Create a standard content view
  • Add a VBO field, in my case to change the author
  • Create preview - in my case the preview showed 100 items
  • Select all - in my case 6000+ items

Nothing changes. 0 items are selected both in the total selected reported and none of the checkboxes being checked

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

j. ayen green created an issue. See original summary.

liquidcms’s picture

Likely not related but i was about to post an issue on how flaky the select all option is and specifically having the actual number of items selected matching with the count shown in "selected X items in this view" fieldset label. These seem to be almost random for me as i pick/unpick select all mixed with picking/unpicking individual items. I also see doing a "clean refresh" (i.e. go to address bar and hit return other than hitting refresh button) and that seems to come up with random selections.

But this was with Chrome. Before i posted i tried with FF and everything worked perfectly.

fool2’s picture

Is your view a block, embed, or a page? I have found that things tend to work differently (or not at all) depending...

liquidcms’s picture

This was for a page.

jvogt’s picture

I'm experiencing this issue as well after updating Views from 7.x-3.24 to 7.x-3.25 (so this may be a Views issue rather than a VBO issue--I'll post there as well). I first encountered it on the page view provided by Better Watchdog UI when trying to bulk delete all Watchdog entries from a specific IP. The user for the entries is Anonymous. The process gets to the progress bar page but finishes immediately without actually deleting any of the entries. The following two errors are also logged:

Type: php
Date: Mon, 2021-11-01 09:48
User: [me]
Location: https://example.com/batch?id=455&op=do
Referer: https://example.com/batch?op=start&id=455
Message: Notice: Undefined index: uid in views_handler_filter_user_name->exposed_validate() (line 94 of /path/to/drupal/sites/all/modules/contrib/views/modules/user/views_handler_filter_user_name.inc).
Severity: notice
Hostname: [my IP]

----
Type: theme
Date: Mon, 2021-11-01 09:48
User: [me]
Location: https://example.com/batch?id=455&op=do
Referer: https://example.com/batch?op=start&id=455
Message: Theme hook not found.
Severity: warning
Hostname: [my IP]

System specs

php 7.4.10
Drupal 7.82
Better Watchdog UI 7.x-3.1
Better Exposed Filters 7.x-3.6
Views 7.x-3.25
VBO 7.x-3.6
Admin theme Seven

akolahi’s picture

I'm not sure if this is meant to be reported as a Drupal 7 / Views 7.x-3.25 issue as suggested by the previous comment. But the issue seems to stem from an update in the latest version of Views (3.25). This line in views.module is problematic for VBO, multi-page:

 function views_exposed_form($form, &$form_state) {
   // Don't show the form when batch operations are in progress.
-  if ($batch = batch_get() && isset($batch['current_set'])) {
+  if (($batch = batch_get()) && isset($batch['current_set'])) {
     return array(
       // Set the theme callback to be nothing to avoid errors in
       // template_preprocess_views_exposed_form().

Reverting this change fixes the issue for me.

anrikun’s picture

I experience the same problem in 7.x.
Should we open a separate issue?

damienmckenna’s picture

A related issue was opened in the Views queue: #3253277: 7.x-3.25 broke batching in VBO

poker10’s picture

@DamienMcKenna Will you release a bug-fix release for views project anytime soon? Or do we have to patch dozens of sites manually do revert this change causing problems? Thank you.

damienmckenna’s picture

Might there have been an API change in VBO at some point that resolved the problem Views was trying to work around?

Is anyone seeing this problem in D8/9, or is this actually just a D7 problem?

graber’s picture

Version: 4.0.0 » 4.0.x-dev
Status: Active » Postponed (maintainer needs more info)

Looking at the steps to reproduce.. Something's probably missing there. Marking this as "Needs more info".
Please provide a better description of the problem for each VBO version affected. Currently I don't see any issues with 4.0.0 on Drupal 9.
Also, issues should be fixed on latest dev, we can't re-release any old releases.

poker10’s picture

We have this issue only on D7 (Views 3.25 + VBO). I can confirm that #6 fixed the issue for us. The problem was not there before updating to Views 3.25. So it seems like that this issue is primary caused by Views, not VBO.

Steps to reproduce are OK. We have discovered the problem when deleting content of one type (hundreds of nodes) - select all button seems to work correctly, but after "delete" operation, nodes were still undeleted. After reverting the change (as mentioned in #6) everything worked again.

graber’s picture

Version: 4.0.x-dev » 7.x-3.x-dev
Status: Postponed (maintainer needs more info) » Active
anrikun’s picture

Please test patch at #4 in #3253277: 7.x-3.25 broke batching in VBO that works for me.

damienmckenna’s picture

Can everyone please test the patch in #3253277 to let us know if it works for you or if you run into any problems with it? Thank you.

voviko’s picture

Same problem.
PHP Version 7.0.33-0+deb9u5 Apache 2.0 Handler: result 0
PHP Version 7.4.26 nginx FPM/FastCGI works
fix: #6

Anonymous’s picture

Patch #14 worked for me.

Anonymous’s picture

Priority: Normal » Critical

Changed this item to critical: it is dangerous to use VBO 'select all items' without this patch, see https://www.drupal.org/project/views/issues/3253277#comment-14374271

lkuttner’s picture

The patch referenced in #14 did not result in any change for me.
Still getting this alert after multiple attempts following vigorous cache clearing and double-checking the patched file on the server.

No operation selected. Please select an operation to perform.
Please select at least one item.