Support » Plugins » Redirection not working for admin environment.

  • Heya,

    I’ve got a problem with redirection after, for instance, updating a field in a plugin I’m implementing. This is what I do:

    1) I post a form from events-manager.php to events-update.php in the administrator section of wordpress.

    2) I carry out some commands in events-update.php and then I want to redirect back to events-manager.php with a query string like “updated=true” so I can use the fancy fading update text, but alas, the error I get is:

    Warning: Cannot modify header information - headers already sent by (output started at /home/neuro/domains/neuro.nl/public_html/blog/wp-admin/admin-header.php:16) in

    Any ideas as to how I can redirect in any of my plugins? I’ve made absolutely sure my scripts do NOT output any HTML before redirecting, so I’m guessing it’s something to do with how wordpress handles redirects?

    I’ve also tried using:

    add_action('init', 'function_with_redirect')

    But that doesn’t work either, apparently. Any ideas or suggestions would be greatly appreciated!

    Thanks in advance!

Viewing 1 replies (of 1 total)
  • Ditto on this. Although I am on 2.0.7. I get this same issue when performing admin functions and also observed when comments are posted. The redirection seems to die and lands on a white page. There is javascript that is making it through though. I still see the script for the stattraq toolbar addition showing up as part of the blank page response.

    I just noticed this post:

    http://wordpress.org/support/topic/66927?replies=2#post-354271

    It may be related although I am unclear as to what he was referring to when he mentions calling ‘exit’ directly afterwards.

Viewing 1 replies (of 1 total)
  • The topic ‘Redirection not working for admin environment.’ is closed to new replies.