When I am changing states with workbench moderation I seem to be having problems with the hook_node_update not triggering. What I need to do is perform a task on the node after each state change, I have six. The problem I have is that if the state changes to 'published' or FROM 'published' to another state hook_node_update triggers and my code performs it's task. But if I change from state1 to state2 and neither one is 'published' then hook_node_update does NOT trigger and my code doesn't run.

Is there a different hook that I should be using for state changes? should hook_node_update be triggering and there's a problem that preventing it from triggering? There's no logs or errors being generated, so I have no feedback from anything on this issue,

Comments

pkuczaj created an issue. See original summary.

avpaderno’s picture

Priority: Major » Normal
Issue tags: -Workbench Moderation node_update
agentrickard’s picture

7.x-1.x is deprecated and not secure. It should not be used.

In 7.x-3.x, you probable want hook_workbench_moderation_transition(). See https://git.drupalcode.org/project/workbench_moderation/-/blob/7.x-3.x/w...