• I’m using a custom form to add information to a database. It worked fine on a single install but since I had issues with having multiple installs, I switched to MultiSite and now it throws the following header. It’s not the code or the theme since it worked fine previously.

    Warning: Cannot modify header information – headers already sent by (output started at /home/bascksug/public_html/wp-includes/class.wp-styles.php:242) in /home/bascksug/public_html/wp-includes/pluggable.php on line 1251

    Warning: Cannot modify header information – headers already sent by (output started at /home/bascksug/public_html/wp-includes/class.wp-styles.php:242) in /home/bascksug/public_html/wp-includes/pluggable.php on line 1254

    All of my searches have come up with results for single sites. Any help is greatly appreciated!

    Thanks!

    • This topic was modified 5 years, 5 months ago by ndmccain.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator bcworkz

    (@bcworkz)

    A WP Network runs different code than single sites, so it’s not a given that code that works on single sites will work on a network. What is happening is you are trying to do a redirect after output has already started. The error message is misleading, it really has little to do with modifying headers. You either need to redirect from an earlier action or use JavaScript to accomplish the redirect.

    Remove closing tag ?> from function.php, extra space after closing the php ?>
    They can be caused by custom code you add to functions.php your WordPress custom code snippet fails to correctly handle one of these functions, then above pluggable.php error occurs.
    e.g
    function custom_contact_form_redirct() {
    $thankYouUrl = site_url(‘/thank-you’);
    ?>
    <?php
    }

    • This reply was modified 5 years, 5 months ago by snehaposcp.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unable to Modify Headers on MultiSite site’ is closed to new replies.