Steps to repeat:
1. Enable the Pathauto and Trigger modules
2. Create a "Redirect to URL..." action (admin/settings/actions)
3. Assign this action to the trigger "After saving a new post" (admin/build/trigger/node)

Expected result:
If you create a new node and check the "Automatic alias" checkbox, an alias will be generated as expected. In accordance with your Trigger settings, you will also be redirected to the page which you specified on the Actions page.

Actual result:
You are redirected to the page specified in your Action, but an alias is not generated.

Comments

greggles’s picture

This definitely makes sense...I'm just not sure how we should fix it.

Pathauto must have a heavy "weight" since it needs taxonomy data which isn't saved until the taxonomy module has run.

The trigger module has a weight of 0 since all core modules have a weight of 0.

The code for the redirect is:

function system_goto_action($object, $context) {
  drupal_goto($context['url']);
}

That seems overly simplistic to me. It halts Drupal's processing and causes bugs like this. I would much rather see a solution which created a global variable $system_goto_action_destination or something like that which is then processed by a module with a very heavy weight...

dave reid’s picture

Status: Active » Closed (duplicate)