Closed (fixed)
Project:
Rules
Version:
6.x-1.1
Component:
Rules Engine
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
19 Nov 2009 at 05:56 UTC
Updated:
16 Sep 2010 at 16:20 UTC
I have some an action with this custom PHP code:
switch($duration) {
case 'One month':
$expire = '+1 month';
break;
case 'Two months':
$expire = '+2 months';
break;
case 'Three months':
$expire = '+3 months';
break;
default:
break;
}
$node_added->expire_timefrom = $expire;
return array('node_added' => $node_added);
This code doesn't seem to have any effect though. Instead, the default expiration for this content type is used (+3 months). When would I call something like this for it to actually take effect? I also tried assigning a timestamp to $node_added->expire, but that resulted in the node having no expiration at all...I'd definitely appreciate any advice on this.
Note that I'm using 6.x-1.x node expire and not the 2.x which I found to be unworkable in its present state.
Comments
Comment #1
mitchell commentedWhich event are you using? 'After saving new content'?
Comment #2
klausiReopen if still an issue.