hello.. I use the feeds module to import some XML external data in nodes and then run rules on the event "content is going to be saved" to perform some tasks.
I would like to be able to avoid the saving of specific nodes based on certain conditions.
So, basically, is there a way to say rules to STOP the saving of the node that triggered the "content is going to be saved" event?
For those of you that have the same need, an alternative idea could be to set a hidden cck field "to be deleted" and then make a rule "content has been saved" that deletes the node if such field is true... but I wonder if there is a more direct approach to avoid saving of the node at all.
Thank you and cheers!
Antonello
Comments
Comment #1
sylvaticus commentedup.. anybody can just tell me even if it not possible at all or point me on a documentation source??
Comment #3
Gabriel R. commentedSubscribing.
Comment #4
Pierco commentedUse the following to disable a rule:
And set active to TRUE to enable the rule:
Edit: sorry, it's for D7 !
Comment #5
sylvaticus commentedHello, I need now to converd my D6 site to D7 and wander if progress has been made on this topic.
I don't (think I) need to "disable" the rule, I just need that, during a "Content is going to be saved" event the rule would be able to stop the saving of the node and possibly leave the user on the the same form.
In D6 I managed with the workaround of flagging the newly saved node with a "to be deleted" field and issue a rule to remove them on the "node has been saved" event, but I wander if this is possible to be achieved more directly now in D7.
Comment #6
Pierco commentedI think you should write a custom processor for feeds and trigger the rules directly from your processor with rules_invoke_event() so you will be able to skip nodes on specific conditions.
Comment #7
orjantorang commentedDrupal 6 - activating and deactivating rules by its machine readable name programmatically:
Comment #8
tr commented