A am using workbench_moderation along with Views bulk operations (VBO) to change the moderation state of several nodes in batch. When I moderate a node, it results in node_save being called twice: once by VBO via entity_save(), and once by workbench_moderatin_store().

This can cause problems, such as Simplenews newsletters being sent out twice (see #1995786: Avoid duplicates by not assuming that simplenews_add_node_to_spool() is called only once).

Look at the enclosed screenshot of the backtraces of the two calls made during the batch VBO execution for a single node.

CommentFileSizeAuthor
Screen Shot 2013-05-15 at 3.31.47 PM.png286.22 KBalberto56

Comments

dotmundo’s picture

Why are you calling node_save and entity_save? I know that node_load and entity_node with type 'node' are the same.

alberto56’s picture

Why are you calling node_save and entity_save

@dotmundo I'm not actually calling anything myself. I'm just setting the moderation state of nodes to "published" using the administrative UI Views bulk operations along with the action provided by Workbench Moderation, and these functions are called.

dotmundo’s picture

Well that's what I saw in your screen shot. I am assuming you did not create any custom module or code to do this processing. I would look at the #submit array for that form to see what gets triggered. You might even see how things are submitted via Firebug. If you do have custom php code r modules, I would like to see them.

byrond’s picture

byrond’s picture

Issue summary: View changes

added ref to other issue.