The MU forums have moved to WordPress.org

wp_redirect in an admin page plugin (2 posts)

  1. dsader
    Member
    Posted 15 years ago #

    I have admin plugins throwing out new "headers already sent errors" with upgrade from WPMU 2.6.5 to WPMU2.7

    Today's workaround was to avoid wp_redirect(from pluggable.php line 856) in a plugin generating an admin page all together:

    Example revised plugin code:

    //		wp_redirect($location);
            echo "<meta http-equiv='refresh' content='0;url=$location' />";

    http://trac.wordpress.org/ticket/2860
    http://wordpress.org/support/topic/179091?replies=1

    Any other plugin users/authors notice an increase in "Headers already sent" errors (post WPMU 2.7) when a plugin admin page saves and refreshes?

  2. grandslambert
    Member
    Posted 15 years ago #

    The most comment culprit for this would be an extra space or line after a closing php tag ?> in a plugin or even a theme file somewhere. I see this all the time and it drives me nuts. Fortunately, the error line you get should tell you which file already sent the header, and in what line, so that can help you find the culprit and fix it.

    I did notice 3 plugins we use did this when I try to use them in 2.7 - but these were plugins written by staff here that aren't released outside the company. However, if you find any, you should notify the plugin devloper so he can fix it for future release.

    BTW, is the redirect line new in 2.7, because I don't get the problems in 2.6.5?

About this Topic

  • Started 15 years ago by dsader
  • Latest reply from grandslambert