Closed (cannot reproduce)
Project:
Rules
Version:
6.x-1.x-dev
Component:
Rules Engine
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Apr 2010 at 09:39 UTC
Updated:
5 Jan 2011 at 13:29 UTC
I am using Rules 6.x-1.2 version, and I have a very strange issue when using rules redirect from a node to another.
This is the rule set:
array (
'rules' =>
array (
'rules_1' =>
array (
'#type' => 'rule',
'#set' => 'event_node_view',
'#label' => 'Profile Redirect when trying to view profile or pp node',
'#active' => 0,
'#weight' => '0',
'#categories' =>
array (
0 => 'Redirects',
),
'#status' => 'custom',
'#conditions' =>
array (
0 =>
array (
'#weight' => 0,
'#info' =>
array (
'label' => 'Viewed content is Profile or Profile Pictures',
'arguments' =>
array (
'node' =>
array (
'type' => 'node',
'label' => 'Content',
),
),
'module' => 'Node',
),
'#name' => 'rules_condition_content_is_type',
'#settings' =>
array (
'type' =>
array (
'profile' => 'profile',
'pp' => 'pp',
),
'#argument map' =>
array (
'node' => 'node',
),
),
'#type' => 'condition',
),
),
'#actions' =>
array (
0 =>
array (
'#type' => 'action',
'#settings' =>
array (
'path' => 'user/[node:author-uid]',
'query' => '',
'fragment' => '',
'force' => 0,
'immediate' => 1,
'#eval input' =>
array (
'token_rules_input_evaluator' =>
array (
'path' =>
array (
0 => 'node',
),
),
),
),
'#name' => 'rules_action_drupal_goto',
'#info' =>
array (
'label' => 'Page redirect',
'module' => 'System',
'eval input' =>
array (
0 => 'path',
1 => 'query',
2 => 'fragment',
),
),
'#weight' => 0,
),
),
'#version' => 6003,
),
),
)
I was getting "Cron run exceeded the time limit and was aborted." error. As soon as i diabled the redirect the cron ran and working fine. It was also culprit for stuck cron.
I
Comments
Comment #1
ayalon commentedI had exactly the same issue...
Comment #2
mkinnan commentedI have the same issue ... this is how I solved it for now. I had to include the admin in the exclusion because running cron manually as user 1 causes cron to crash and I had to reset the cron variables in the system table in the database.
Now that I got this to work, I am having trouble with searching because it does unwanted redirects when you search for a term.
Create a new rule and for the 'Do' execute a custom PHP script:
There might be a way to do this without doing a php script, but I could not figure out how to get specific user ID exclusion in the 'If' part.
Comment #3
mkinnan commentedTo fix the issue I was having with searches:
http://drupal.org/node/679648#comment-2580456
Comment #4
fagoIndeed, the redirect action should probably do nothing in case cron is active.
Comment #5
fagoAs this bug-report is rather old, please verify it's still valid in the latest dev version and re-open if so. For now, I'm marking it as closed.