It looks like silly question but I'm really confused about redirection after node save and update.
I tried to set $form['#redirect']
- without any success.
I tried to set some other vars for instance: $_REQUEST['destination']
or in $form['buttons']['submit']['#submit']
setting function name to call that sets $form_state['#redirect']
but none of this solution works.
Can you give me some source that explains node forms redirecting in D7?
header('Location: /new-page'); drupal_exit();
. It's not the best but it does get the job donedrupal_goto()
function, all it does is internally set headers. If anything you're optimising your code by removing an extra function call overhead :)