I have VBO custom actions defined and it gets triggered. Also, I do NOT have 'behavior' => array('changes_property') defined in my hook_actions_info() as described in http://drupal.stackexchange.com/questions/30910/how-to-create-custom-vbo...

I see that my custom action is getting triggered and does custom operations and finally saves by creating new node revision. Weird part is that entity_save operation is being called after this and it is updating node table with older version of node rather than new vesrion created by custom funtion.

How can I stop or prevent vbo to call entity_save and just perform custom action?

Any insights will be greatly helpful.

Thanks!

Comments

sjf_ddev created an issue. See original summary.

jboyette36’s picture

I was running into the same type of issue where I had removed 'behavior' => array('changes_property') from my custom action's definition. However on digging in, I found in plugins/operation_types/action.class.php lines 22-25 that if you don't specify the 'behavior' attribute in your definition it gets set to array('changes_property') by default. When I set it to an empty array as in: 'behavior' => array(), then it started working as I expected.

I think this issue should be set to: Closed (Works as designed).

joelpittet’s picture

Status: Active » Closed (duplicate)

#2254871: Default action behaviors in getAccessMask() The original issue that caused this got some thought similar to this issue and so I'm going to bring you all to the same issue (there was probably 10 issues trying to solve this in similar ways)

supriyarajgopal’s picture

Hi @jboyette36,

For me, setting 'behavior' to empty array didn't help because action.class.php checks for if(empty()) to default it to 'changes property'.
Therefore, I just set 'behavior' to a random string like so:
'behavior' => array('skip update'),

This worked for me, hope it helps someone.