When attempting to add new roles to users via VBO, it goes to the role selection screen, then on submit I receive the following message consistently:

Notice: Undefined index: list callback in views_bulk_operations_get_operation() (line 224 of /var/www/drupal-7.31/sites/all/modules/views_bulk_operations/views_bulk_operations.module).

This happened when trying to ADD a single role to all selected users - whether some users already have the role or not.

Tested with all users selected and single user selected.

Comments

panamaquono’s picture

same issue

panamaquono’s picture

Mine is also the same line -Fatal error: Function name must be a string in "......."/sites/all/modules/views_bulk_operations/views_bulk_operations.module on line 224

scjv’s picture

Same issue:

Notice: Undefined index: operation in views_bulk_operations_form_submit() (line 668 of .../modules-d7/views_bulk_operations/views_bulk_operations.module).
Notice: Undefined index: operation in views_bulk_operations_form_submit() (line 669 of .../modules-d7/views_bulk_operations/views_bulk_operations.module).
Notice: Undefined index: list callback in views_bulk_operations_get_operation() (line 224 of .../modules-d7/views_bulk_operations/views_bulk_operations.module).

Apache error_log:

[Mon Sep 08 16:00:17 2014] [error] [client XX.XX.XX.80] PHP Fatal error: Function name must be a string in .../views_bulk_operations/views_bulk_operations.module on line 224, referer: http://www.site.com/admin/content/newsletter-creation?type=themadocument...

And Dev version gives the same error:

version = "7.x-3.2+9-dev"
core = "7.x"
project = "views_bulk_operations"
datestamp = "1407696528"
Notice: Undefined index: operation in views_bulk_operations_form_submit() (line 695 of .../views_bulk_operations/views_bulk_operations.module).
Notice: Undefined index: operation in views_bulk_operations_form_submit() (line 696 of .../views_bulk_operations/views_bulk_operations.module).
Notice: Undefined index: list callback in views_bulk_operations_get_operation() (line 223 of .../views_bulk_operations/views_bulk_operations.module).
bojanz’s picture

I've never been able to reproduce this issue, despite several reports.

Please debug it and provide a patch. Thanks!

Uv516’s picture

I have tried the dev from 2014-Oct-01: Same problem.
In one specific moment the line 223: $plugin['list callback']($operation_id); seem to make a system error.
I have tested the line during a process for changing user roles. Many times the line 223 is NOT a string:

  1. I refresh the page: One or more times the $plugin-process is NOT a string, but the process continues
  2. I set "Change user roles"
  3. I mark 2 users
  4. I press Run
  5. During the proces I saw that the "$plugin" was not a string, but the process continues
  6. I choose one user role to be added
  7. I press Next
  8. Systembreak! Without leaving a message to me other than "Fatal error: Function name must be a string in /home/xxxxxxx/public_html/sites/all/modules/views_bulk_operations/views_bulk_operations.module on line 223"

Tip to all:
I use this command to test the code - it is pretty good:

drupal_set_message('<pre>'.print_r(basename(__FILE__), True).', line '.print_r( __LINE__ , True).':<br> my look  = '. print_r( , TRUE) .'</pre>','warning');
GiorgosK’s picture

Happens to me when "Skip confirmation step" is unchecked
if I check this for the action error goes away