Active
Project:
Workbench Moderation
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 May 2013 at 19:51 UTC
Updated:
29 May 2013 at 15:06 UTC
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.
| Comment | File | Size | Author |
|---|---|---|---|
| Screen Shot 2013-05-15 at 3.31.47 PM.png | 286.22 KB | alberto56 |
Comments
Comment #1
dotmundo commentedWhy are you calling node_save and entity_save? I know that node_load and entity_node with type 'node' are the same.
Comment #2
alberto56 commented@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.
Comment #3
dotmundo commentedWell 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.
Comment #4
byrond commentedI am wondering if the patch in #1787214: VBO action to change state has a blank checkbox and sets the state back to the original state after it is changed will fix this issue as well.
Comment #4.0
byrond commentedadded ref to other issue.