Closed (fixed)
Project:
Rules
Version:
6.x-1.x-dev
Component:
Rules Engine
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
3 Oct 2010 at 11:47 UTC
Updated:
21 Dec 2010 at 19:27 UTC
Any tips? In my module http://www.drupal.org/project/clickbank_ipn the "After saving new content" event does not work because I am saving new content with "node_save"
Comments
Comment #1
giorgio79 commentedHere is my rule as well.
The goal is to create a new user when a new Clickbank IPN node is saved. :)
Comment #2
giorgio79 commentedCould this be related? #478330: Keeps on evaluating to False on "Has Content Type" when running rule "after saving new content"
Comment #3
giorgio79 commentedI just tested the trigger and it does work fine when I create the node for the content type manually, yet for some reason it does not work when it is done programmatically with node_save. Bit baffled :)
Comment #4
giorgio79 commentedOk, in my tests I succeeded with getting this to work by loading the admin user before node save like this
http://drupal.org/node/178506#comment-778935
Can someone comment on how secure this is and if this is the way to solve it?
Comment #5
giorgio79 commentedIn my code I assign uid 1 when creating the content, and tried changing that to 0 (anonymous) , perhaps it was some kind of permission issue but no luck.
Browsing around the issue queue I also found the node delete patch for Rules, which had permission issues as well, so implemented direct SQL queries. Seems a bit hackish :)
#400334: Action: delete node
Comment #6
giorgio79 commentedI guess I will implement it like this:
In an attempt to make this somewhat secure :)
Comment #7
ionmedia commented#4 fix issue with triggers after saving new node via node_save
Comment #8
giorgio79 commentedThanks ionmedia, kind of forgot about this issue.
I also managed to solve it by assigning proper permissions, namely node creation for anonymous user :)