I just want to note some troubles of the Redirect to URL action:

* It's not possible to redirect to urls containing query parameters or url fragments - ? or # is url encoded and treated as path.
* Redirecting on node insert / update causes troubles if a node access module is used - resulting in not being able to access the page. This is because the grants are written after the hook is invoked. If you are interested, see my old blog post for how I solved this in workflow-ng / rules.

Comments

fago’s picture

Note that both applies to d6 too.

dave reid’s picture

marcp’s picture

Marked #560462: Redirect to URL on state transition short-circuits hook_nodeapi() for modules that come after workflow as a duplicate. In that issue, we're using Redirect to URL on a workflow transition. Same problem -- location_node doesn't get a chance to save its data in hook_nodapi().

Fiddling with module weights can only take this so far.

fago’s picture

For rules I further improved the solution to use postpone the redirect to the templace preprocess hook of 'page'. Works fine!

See rules_action_drupal_goto() in http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/rules/rules...

marcingy’s picture

Status: Active » Closed (duplicate)