Redirection in Drupal's _submit() functions.

I am working on a website which uses the contrib module "mysite". The client wants me to modify the landing page after you change some config. The right way of doing that would be to use hook_form_alter() and change the redirect value:

$form['#redirect'] = 'newpath';

However, this was not working for me. I found out this was because the author of the module mysite was using drupal_goto() inside the _submit functions. This is not the recommended way of specifying where you want the page to go to after your form was submitted. You have to return the path.

For more details, see the issue I created:
http://drupal.org/node/521246

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote>
  • You may post PHP code. You should include <?php ?> tags.
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options