1

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 How to create custom VBO action?

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!

| improve this question | | | | |
1

This is an old issue, but I literally just had the same problem and after banging my head off of it all day I found upon a solution through the d.o issue queue.

https://www.drupal.org/node/2254871

I applied the patch from #42 and it solved it right away after setting 'behavior' => array().

Hope this helps someone else.

| improve this answer | | | | |
  • This is the correct answer. – jackrabbithanna Feb 13 '19 at 18:45
  • And you posting this sure saved me time and helped alot, thanks! – jackrabbithanna Feb 13 '19 at 18:50
0

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. To prevent entity_save from running, set it to an empty array as in:

'behavior' => array()

then it should start working as you expect.

| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.