Hey -

I was working on getting workflow_ng to send out emails when certain things happened, and finally got it to fire an email only when a new revision has been published. But it only worked when a user went through the "revisions" tab and reverted there. It didn't work when they viewed the revision and clicked the "publish revision" link. I figured out that this was because workflow_ng didn't know anything had happened. Is there anything wrong with adding node_invoke_nodeapi($node, 'update'); into that piece of code? I'm kind of shooting in the dark here, which is never a good thing, but it looked like that call's purpose was to alert the system that a node had been updated, which is what I wanted.

Thoughts? Am I screwing something up? If not, shouldn't this be included, so that the rest of the system knows something happened?

Thanks,

Isaac

CommentFileSizeAuthor
hook_update_node_revision.patch728 bytesisaac.niebeling

Comments

kpander’s picture

Hi Isaac,

I've got the same issue as you in that I need 'stuff to happen' when I directly click on 'Publish Revision'.

Rather than using,

node_invoke_nodeapi($node, 'update');

I added a new $op value:

node_invoke_nodeapi($node, 'publish revision');

... because we're not *really* doing a node update here. Then I have a custom hook_nodeapi call which responds to the 'publish revision' item. Anyways, just thought I'd chime in on this old issue.

Kendall
Abandoned Industry :: http://invisiblethreads.com ::