<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">It looks like you're setting the submit handler incorrectly. Use this example as your guide:<div><br></div><div><a href="http://drupal.stackexchange.com/questions/9436/how-do-i-add-an-additional-submit-handler">http://drupal.stackexchange.com/questions/9436/how-do-i-add-an-additional-submit-handler</a></div><div><br></div><div>It deals with Drupal Commerce, but it covers the same issue.<br><div><br></div><div>Also remember that particularly on the node forms, the submit handler can also be set on the submit button. Inspect the values found in the $form['values'] array and you should be able to see if that's the case. I'm pretty sure that's how the node submit forms are set up.</div><div><br></div><div><div>Thanks,</div><div><br></div><div>Trevor Twining</div><div>Web Team Lead</div><div>Points of Light Institute</div><div><a href="http://pointsoflight.org">http://pointsoflight.org</a></div><div><br></div><div><br></div><div><div><div>On 2011-10-17, at 12:55 AM, sebastian wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>Also if I try and add:<br><br>$form_state['submit_handlers'][] = 'HOOK_submitHandler';<br><br>Inside of:<br><br>HOOK_form_alter<br><br>It just ignores it [clears it] when it comes time to save...<br><br>And replaces it with the single function call:<br>node_form_submit<br><br>:(<br><br>I also set the $_GET['destination'] = 'http://someplace.com';<br><br>But this is also ignored...<br><br>Still really struggling with this. Is it really this hard to redirect <br>the node_save page?<br><br>Best,<br><br>Sebastian.<br><br>On 2011-10-17 10:49 AM, sebastian wrote:<br><blockquote type="cite">Hello there,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I have a form which I am changing with:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">HOOK_form_page_node_form_alter(&amp;$form, &amp;$form_state, $form_id) {<br></blockquote><blockquote type="cite">}<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I have set:<br></blockquote><blockquote type="cite">$form_state['redirect'] = <a href="http://something.com">http://something.com</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I can confirm that:<br></blockquote><blockquote type="cite">$form_state['programmed'] = false;<br></blockquote><blockquote type="cite">$form_state['rebuild'] = false;<br></blockquote><blockquote type="cite">$form_state['no_redirect'] = false;<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">And:<br></blockquote><blockquote type="cite">$_REQUEST['destination'] = <a href="http://something.com">http://something.com</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">When I reach the function:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">node_form_submit<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">It blatantly does:<br></blockquote><blockquote type="cite">if ($node-&gt;nid) {<br></blockquote><blockquote type="cite">$form_state['redirect'] = 'node/' . $node-&gt;nid;<br></blockquote><blockquote type="cite">}<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">And thus destroys all my hard work at making a redirect...<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">How can I hook into this process to either STOP node_form_submit from<br></blockquote><blockquote type="cite">changing my ['redirect'] back to '/node'<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">OR<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">How can I make the node save event trigger my $_REQUEST['destination']<br></blockquote><blockquote type="cite">instead of: drupal_redirect_form($form_state)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Since the value that drupal_redirect_form($form_state) get's is wrong as<br></blockquote><blockquote type="cite">node_form_submit screwed with it at the very last step of the process.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I have read:<br></blockquote><blockquote type="cite"><a href="http://api.drupal.org/api/drupal/includes--form.inc/function/drupal_redirect_form/7">http://api.drupal.org/api/drupal/includes--form.inc/function/drupal_redirect_form/7</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">This doesn't seem to work in D7 either:<br></blockquote><blockquote type="cite"><a href="http://www.brianvuyk.com/story-type/changing-redirect-value-drupal-node-form-d6">http://www.brianvuyk.com/story-type/changing-redirect-value-drupal-node-form-d6</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Totally baffled... I'm either missing something in the flow of the form<br></blockquote><blockquote type="cite">save process [where to actually hook it] or something is wrong with<br></blockquote><blockquote type="cite">D7... [probably the former as I am still a young padawan]<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Thanks for your help!!<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">best,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Sebastian.<br></blockquote>-- <br>[ Drupal support list | <a href="http://lists.drupal.org/">http://lists.drupal.org/</a> ]<br></div></blockquote></div><br></div></div></div></body></html>