I have a simple view listing some users and I use VBO to execute an action on the selected users. This used to work, but now it seems to have stopped working - the selection is lost after the action is configured. I have verified that $form_state['values']['views_bulk_operations'] contains the correct selection on the configuration page, but after submitting and getting to what should have been the confirmation page, $form_state['values']['views_bulk_operations'] has all values set to zero. And of course I get the error message "Please select at least one item."
I have tested this with the simple mesage action (system_message_action).
I have Drupal 7.10, Views 7.x-3.1 and VBO 7.x-3.0-beta3.
PS! I'm wondering if #1348552: Token replacement for system actions not being done on user views is related.
Comments
Comment #1
bojanz commentedI don't have any problem with user operations.
1) Test the -dev version.
2) Test another view (admin/content2), so that you know if it's just users, or other entity types as well. Sounds like it should be broken across the board.
3) Debug your modules, see if there's any that might cause problems (usually due to caching or form altering)
Comment #2
hansfn commentedThx a lot for the quick reply. I had of course cleared the cache (like a million times), but I was wrong that the problem was related to users only - it's broken across the board.
I have tested with the dev version - same problem. I have disabled and uninstalled all non-core Views modules and cleared the cache again - same problem.
I don't see that any of the other modules should alter any Views Bulk Operations forms. I just don't get it. I'll start with a fresh/empty Drupal 7.10 and see if I can recreate the issue.
Thx for your time so far.
Comment #3
hansfn commentedOK, as promised I took a fresh/empty Drupal 7.10 and installed the same modules as on the site where the bulk operations are broken. (I even ran a recursive diff to verify that the same versions were installed.) "Unluckily", bulk operations worked on the fresh site after installing and enabling the same modules. (I ran a diff on the output from "drush pm-list" to ensure that the status for the modules were the same.)
So basically I wasted two hours trying to find the module causing my troubles. Since this is a real problem for me (and another user I have communicated with), I'm willing to spend even more time on this. Do you have any hints as to where I should look? Any variables related to VBO operations? (I have checked that the settings for Views are identical on the two sites.)
I could give you access to the two sites, but not SSH access. I understand that you probably don't have time.
Comment #4
bojanz commentedSo it's working on a copy of the site that has the same modules? That points to server config.
Comment #5
hansfn commented1) It's not an 100% identical copy - the new site just has the same modules installed and enabled. (I hoped/expected to find the guilty module this way.)
2) The new site is on the same server - just a new installation in sibling folder.
In other words, I don't think it's a server config issue. And VBO worked before.
Comment #6
bojanz commentedOdd. Create a drupal account that has access to VBO, Views, and devel/php, and email me the details, I can try and debug it.
Comment #7
hansfn commentedThx to the skills of bojanz, it became clear that the form data was definitely disappearing from cache. It was a user error from my side, not related to VBO:
I had
in my settings.php - I added it not too long ago when doing some development - without the needed
I'm sorry for having wasted everyone's time.
Comment #8
hansfn commentedComment #9
bojanz commentedOkay, so we now know why a problem like this can happen.
Closing this issue, and linking it from other similar ones.
Comment #10
SGhosh commentedConfirming #7 solved the problem. Thanks @hansfn.