Hi,
I'm trying to redirect to a page after a node has been published. It's not working, and I can't seem to figure out why. The configuration is:
* Invoked on event: Content has been updated
* Content type: n2y3_project
AND
* Numeric comparison of [node:status] Greater than [node_unchanged:status]
In my testing, I'm editing a node that has a status of '0' (not published), changing it to Published so that status is '1' and submitting. I'm expecting to get the redirect afterwards, but I'm just returned to the node view page.
Here's the export of the workflow:
array (
'cfg_5' =>
array (
'#type' => 'configuration',
'#altered' => false,
'#event' => 'node_update',
'#label' => 'Project Publish',
'#active' => 1,
'#module' => 'workflow-ng',
0 =>
array (
'#type' => 'condition',
'#name' => 'workflow_ng_condition_content_is_type',
'#argument map' =>
array (
'node' => 'node',
),
'#settings' =>
array (
'type' =>
array (
'n2y3_project' => 'n2y3_project',
),
),
'#label' => 'Content has type',
),
1 =>
array (
'#type' => 'action',
'#name' => 'workflow_ng_action_drupal_goto',
'#settings' =>
array (
'path' => 'redirect',
'path_args' =>
array (
),
'query' => '',
'query_args' =>
array (
),
'fragment' => '',
'fragment_args' =>
array (
),
'force' => 0,
'override' => 1,
),
),
2 =>
array (
'#type' => 'condition',
'#name' => 'workflow_ng_condition_token_numeric',
'#settings' =>
array (
'text1' => '[node:status]',
'text1_args' =>
array (
0 => 'node',
),
'text2' => '[node_unchanged:status]',
'text2_args' =>
array (
0 => 'node_unchanged',
),
'operation' => 'greater',
),
'#label' => 'Numeric comparison',
),
'#name' => 'cfg_5',
),
)
Thanks for your help!
Comments
Comment #1
fagodoes it work if you negate the numeric condition?
Comment #2
vonster commentedThe problem is the numeric condition. The [node:status] field doesn't store the value you're expecting from the 'node' table, but rather yes/no depending on whether the node is published or not.
Comment #3
fagoah, of course, thanks, vanderson for clarifying this.
Comment #4
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.