I'm using 7.x-1.2+45-dev.

Steps to reproduce:

I have a rule that triggers on the event "Content revision has been updated."

On this rule, add a condition "User has role(s)".

Set the user to "user" (acting user) and check for a role. Add an action like "Show message on site." Save the rule.

Then, cause the rule to be executed. I get the following error:

Warning: call_user_func() expects parameter 1 to be a valid callback, function 'rules_events_argument_global_user' not found or invalid function name in RulesState->get() (line 148 of /Volumes/Bullfrog/om/sites/all/modules/contrib/rules/includes/rules.state.inc).

When I instead set to "target-author" (target revision author), there is no error and the rule functions as expected.

Comments

rdeboer’s picture

Assigned: Unassigned » rdeboer

Thanks for your report, Patrick.
Will try and reproduce.

baronmunchowsen’s picture

I get this error too, when trying to use global user tokens in a 'send mail' action when a new revision is created.

The tokens I was trying to use were:
[user:mail]
[user:field-userdata-firstname] (custom field on user entity)
[user:field-userdata-lastname] (custom field on user entity)

Warning: call_user_func(rules_events_argument_global_user) [function.call-user-func]: First argument is expected to be a valid callback in RulesState->get() (line 148 of /Users/.../sites/all/modules/contrib/rules/includes/rules.state.inc).

Using
Revisioning 7.x-1.4 (2012-Apr-01)
Rules 7.x-2.1 (2012-Mar-16)

westbywest’s picture

On my setup:
Drupal v7.12
Revisioning 7.x-1.4
Rules 7.x-2.1

... there is no function declared anywhere named "rules_events_argument_global_user()," although the revisioning module calls it at line # 66 of revisioning.rules.inc here:

revisioning/revisioning.rules.inc: 'handler' => 'rules_events_argument_global_user'

rdeboer’s picture

@westbywest, #3
Yep, that's the wrong function to use.
Need time to investigate further.

rdeboer’s picture

Status: Active » Fixed

Fixed up the function with the latest checkin.

You may have to refresh the caches and re-save your rule so that the change kicks in.

rdeboer’s picture

Note: suggest to use "site:current-user" instead.

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

added more detail about how to reproduce the problem