Hello,

I am running Drupal 6.20, PHP 5.3, and the latest versions of Rules (6.x-1.4) and the latest -dev version of VBO (6.x-1.x-dev).

I have created a bulk operations view, from which an administrator can select nodes, then have a ruleset performed on those nodes. It works perfectly when I perform the operation manually. However, I would like for the operation to be triggered on each cron run, which was easy enough to set up as it's own schedules rule.

However, when I run cron, I get the following message:

WD views bulk operations: Could not find operation views_bulk_operations_ruleset_action_rules_[name_of_my_ruleset]
in view 20.

Any thoughts as to why VBO would be able to find the action when I execute the function manually but not when I execute it via cron?

Comments

osman00’s picture

I have the exact same problem...

infojunkie’s picture

Can you please add the following code to views_bulk_operations.module:

function views_bulk_operations_cron() {
  _views_bulk_operations_load_actions();
}

Does this work better?

bojanz’s picture

Status: Active » Closed (won't fix)

A year has passed, no reply from the original poster.

SchwebDesign’s picture

Status: Closed (won't fix) » Active

i'm having this same issue.

if i run this code from devel modules path /devel/php to execute php code it works great:

views_bulk_operations_execute(
'nodes_by_user',
'node_unpublish_action',
$operation_arguments = array(),
$view_exposed_input = array(),
$view_arguments = array('171')
);

but if i add this to a conditional action predicate with 'execute conditional php code' action:

_views_bulk_operations_load_actions();
views_bulk_operations_execute(
'puppy_and_cat_nodes_by_user',
'node_unpublish_action',
$operation_arguments = array(),
$view_exposed_input = array(),
$view_arguments = array($order->uid)
);
watchdog('users content unpublished', 'content for user @userid has been unpublished because of removed access role', array('@userid' => $order->uid));

i get this error in watchdog:
Could not find operation node_unpublish_action in view puppy_and_cat_nodes_by_user.

I added

_views_bulk_operations_load_actions();

as you can see.

I also tried adding it within the views_bulk_operations_execute() function in views_bulk_operations.module but it doesn't help.

i checked permissions and all roles except anonymous have the permission to execute this 'node_unpublish_action' action

Any help on this asap would be greatly appreciated! Any other information i can provide?

infojunkie’s picture

Status: Active » Closed (won't fix)

@ SchwebDesign, not sure you are having the same issue, since you're not finding all node actions.

Can you please open a new issue with this? I also need to understand what you mean by if i run this code from devel modules path /devel/php to execute php code - please type the exact command line used and any additional script.

Also, where do you set the conditional action predicate with 'execute conditional php code' action?

Please add these details to the new issue.

SchwebDesign’s picture

Infojunkie, thanks for your response. I've posted this issue and my response here: http://drupal.org/node/1496506