* warning: call_user_func(views_bulk_operations_ruleset_action_one_submit) [function.call-user-func]: First argument is expected to be a valid callback in /var/www/artsci/export2/home/artsci/facstaff/deans/cdrupal6/public_html/sites/afar.artsci.wustl.edu/modules/views_bulk_operations/views_bulk_operations.module on line 936.
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in /var/www/artsci/export2/home/artsci/facstaff/deans/cdrupal6/public_html/sites/afar.artsci.wustl.edu/modules/views_bulk_operations/views_bulk_operations.module on line 1469.
This error does not occur when initially configuring the action - only when editing it.
Below is an export of the triggered rule:
array (
'rules' =>
array (
'rules_41' =>
array (
'#type' => 'rule',
'#set' => 'event_flag_flagged_report_complete',
'#label' => 'Remove editing privileges and mark all related content complete',
'#active' => 1,
'#weight' => '0',
'#categories' =>
array (
),
'#status' => 'custom',
'#conditions' =>
array (
0 =>
array (
'#type' => 'condition',
'#settings' =>
array (
'type' =>
array (
'profile' => 'profile',
),
'#argument map' =>
array (
'node' => 'node',
),
),
'#name' => 'rules_condition_content_is_type',
'#info' =>
array (
'label' => 'Flagged content is Faculty Profile',
'arguments' =>
array (
'node' =>
array (
'type' => 'node',
'label' => 'Content',
),
),
'module' => 'Node',
),
'#weight' => 0,
),
),
'#actions' =>
array (
0 =>
array (
'#type' => 'action',
'#settings' =>
array (
'field_name' => 'field_report_submitted_date',
'#argument map' =>
array (
'node' => 'node',
),
'value' =>
array (
0 =>
array (
'value' => NULL,
'value2' => NULL,
'timezone' => NULL,
'offset' => NULL,
'offset2' => NULL,
'rrule' => NULL,
),
),
'code' => '$now = date(\'Y-m-d\'). \'T00:00:00\';
return array(0 => array(\'value\' => $now));',
'vars' =>
array (
),
),
'#name' => 'content_rules_action_populate_field',
'#info' =>
array (
'label' => 'Populate flagged content\'s field \'field_report_submitted_date\'',
'arguments' =>
array (
'node' =>
array (
'type' => 'node',
'label' => 'Content',
),
),
'eval input' =>
array (
0 => 'code',
),
'module' => 'CCK',
),
'#weight' => -4,
),
1 =>
array (
'#weight' => 0,
'#info' =>
array (
'label' => 'Execute a VBO programmatically on node',
'arguments' =>
array (
'object' =>
array (
'type' => 'node',
'label' => 'Object',
),
),
'module' => 'Views Bulk Operations',
'eval input' =>
array (
),
'base' => 'rules_core_action_execute',
'action_name' => 'views_bulk_operations_action',
'configurable' => true,
),
'#name' => 'views_bulk_operations_action_node',
'#settings' =>
array (
'view_vid' => '6',
'operation_key' => 'views_bulk_operations_ruleset_action_rules_remove_edit_own',
'operation_arguments' => '',
'view_exposed_input' => '',
'view_arguments' => 'return array($object->uid);',
'#argument map' =>
array (
'object' => 'node',
),
),
'#type' => 'action',
),
),
'#version' => 6003,
),
),
)
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 914028.patch | 8.51 KB | infojunkie |
Comments
Comment #1
jastraat commentedThis is still a problem in the new official release.
Comment #2
itangalo commentedI think I've nailed down the problem to a conflict with the core PHP Filter module. I got similar errors (after a white screen), and it only appears when the PHP Filter module is enabled.
@jastraat: Could you try turning of PHP Filter and see if the error messages disappears?
Changing the title to reflect my suspicions.
To replicate bug:
* Create a VBO that takes at least one argument.
* Turn on PHP Filter module.
* Create a triggered rule with an action that calls the VBO programmatically. In the view argument settings, type somthing like
return array($object->nid);.* Try to save the action.
Saving the action will result in a blank page. When backing to the configuration page, an error message similar to the one in the top post will apperar.
When turning off the PHP Filter module everything works as expected.
Comment #3
itangalo commentedOK, some more checks, and I must admit that I had it all wrong. Just as jastraat says: the problem is that you can't edit and resave the action once you've created it.
(Jeez, it is scary how you can get hooked on some patterns you think you see.)
Sorry for the confusion. Changing the title again.
Comment #4
milos.kroulik commentedsubscribe
Comment #5
infojunkieI see the failure concerns invoking a ruleset from within the VBO action. Is this the case for all posters? Can you confirm that calling another action (e.g. "Publish node") from the VBO action does not cause this problem?
Comment #6
infojunkieNerver mind #5: I was able to reproduce this.
Comment #7
infojunkieFixed in latest dev. Please try it and let me know how it works.
I'd be especially grateful if you could test that the VBO action executes properly when triggered by Rules.
Comment #8
jastraat commentedCould you attach the relevant patch?
Comment #9
infojunkiePatch attached.
Comment #10
itangalo commentedI tried the patch on VBO 1.10, but it resulted in error messages when I tried to save the VBO actions:
The action got saved, but when revisiting it no view and action were selected. (Probably all configuration was lost.)
Sorry for bad news. :-(
Comment #11
jastraat commentedI'm afraid I also had an error with the above patch when attempting to save an existing VBO action:
Fatal error: Unsupported operand types in ../all/modules/rules/rules/modules/rules.rules.inc on line 406
* warning: call_user_func(views_bulk_operations_ruleset_action_one_submit) [function.call-user-func]: First argument is expected to be a valid callback in ../modules/views_bulk_operations/views_bulk_operations.module on line 971.
* warning: array_merge() [function.array-merge]: Argument #2 is not an array in ../modules/views_bulk_operations/views_bulk_operations.module on line 1506.
Comment #12
itangalo commentedChanging status to 'needs work'.
PS: Also tested on dev version, but the patch didn't apply correctly and didn't make much difference.
Comment #13
infojunkieCan you please test the latest dev without the patch? What version of Rules are you using?
Comment #14
itangalo commentedNew test results!
* It seems to work fine when standard actions are chosen as the VBO action.
* It breaks when rule sets are called as actions, with the effects described in #10.
This might thus be a bug in Rules (but doesn't have to be).
I'm using Rules 1.3, but also tried on dev (which for some strange reason was *older* than the 1.3 release). Same effect.
Comment #15
itangalo commentedMore new test results!
* It seems to work fine for rule sets with two (I guess multiple) arguments.
* It breaks as described above for rule sets with one or zero arguments.
Comment #16
infojunkie@Itangalo: Thanks very much! The code for zero and one arguments is indeed different from multiple args. That helps a lot.
Comment #17
infojunkieTagging for next release.
Comment #18
adraskoy commentedsubscribe
Comment #19
nodecode commentedsubscribe
Comment #20
MasterChief commentedI have the same problem, is it will be fix soon ?
Comment #21
itangalo commented@MasterChief: There is an ugly workaround if it is critical for your functions – just make another argument for the rule set (without ever using its content). It will be a bit more difficult to configure the action that calls the VBO, but it will work.
(You can't add arguments to rule sets once they are created, but if you look in the export code from a rule set it is pretty easy to add a new argument with copy-paste – and then import the result.)
Comment #22
MasterChief commentedCould you give me an example of what you put in view arguments in a VBO action because i have always the same error message.
Comment #23
itangalo commentedFor the view argument settings, I use something like this:
This would send three argument to Views – the node ID of the node used to execute VBO (as configured in the Rules action), a static value, and the second(!) part of the path – '17' if the current path is 'node/17'.
Comment #24
MasterChief commentedHi Itangalo, thanks for your answer!
My action is 'Use signup object to execute a VBO programmatically'.
I tried a code like this :
and this too :
but i have always this error message :
The object is a signup object.
Do you have an idea to fix this?
Comment #25
itangalo commentedSome clarification!
The error messages in #24 appears when saving the action, not when executing the rule.
The phrase "call_user_func(signup_cancel_action_submit)" seems a bit strange – my guess is that it should be "call_user_func('signup_cancel_action_submit')".
My initial guess is that it is something wrong from the Signup module's part, but discussion with MasterChief relealed that similar problems occur even when using a user object to execute a VBO.
There will probably be another bug report from MasterChief.
Comment #26
MasterChief commentedI had a discussion with Itangalo and it seems that something goes wrong with VBO when we use Rules, so i will open another issue because this issue isn't the only.
Comment #27
infojunkieI've committed a fix for #10 and #24 above. Please try the latest dev (12 hours from now) and let me know!
Comment #28
MasterChief commentedHi infojunkie, thanks for your answer!
I will try it when it will be available to download, i will tell you today if it's works :)
Comment #29
MasterChief commentedI don't have anymore the error message so now i can save but i have still the problem of #1 in this issue :
http://drupal.org/node/977144
Comment #30
infojunkieComment #32
niklp commentedOh thank God!
I lost a LOT of time on fixing an error very similar to this. Almost impossible to debug! Pretty please make a new point release now - it's been a good few months?