Hi, I'd like to create a rule which triggers upon the creation OR update of a node.

My problem is that I need to use the $node_unchanged variable, but it becomes unavailable as soon as I add node creation in the list of triggering events.

I would think that $node_unchanged would still be available when updating a node, but that doesn't seem to be the case. Its disabled the moment node creation is add as a trigger.

Thanks.

Comments

tr’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

$node_unchanged does not exist and should not exist when you are triggering on a newly-created node, so it will not in general be available to any rule that triggers on that event. If you insist on writing one rule that uses both creation and updating events, then you should write it to use only the data values that are available from both events.