Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter revlow

    (@revlow)

    Oh, wait. I read the error more carefully. This is what it says:

    Warning: Cannot modify header information – headers already sent by (output started at /home/gabby/public_html/wp-content/themes/spacious/page-templates/business.php:13) in /home/username/public_html/wp-includes/pluggable.php on line 1196

    The home page is set up on this business template. I looked at pluggable.php. The line 1196 is:

    header("Location: $location", true, $status);

    And it is part of this:


    if ( !function_exists('wp_redirect') ) :
    /**
    * Redirects to another page.
    *
    * @since 1.5.1
    *
    * @param string $location The path to redirect to.
    * @param int $status Status code to use.
    * @return bool False if $location is not provided, true otherwise.
    */
    function wp_redirect($location, $status = 302) {
    global $is_IIS;

    /**
    * Filter the redirect location.
    *
    * @since 2.1.0
    *
    * @param string $location The path to redirect to.
    * @param int $status Status code to use.
    */
    $location = apply_filters( 'wp_redirect', $location, $status );

    /**
    * Filter the redirect status code.
    *
    * @since 2.3.0
    *
    * @param int $status Status code to use.
    * @param string $location The path to redirect to.
    */
    $status = apply_filters( 'wp_redirect_status', $status, $location );

    if ( ! $location )
    return false;

    $location = wp_sanitize_redirect($location);

    if ( !$is_IIS && PHP_SAPI != 'cgi-fcgi' )
    status_header($status); // This causes problems on IIS and some FastCGI setups

    header("Location: $location", true, $status);

    return true;
    }
    endif;

    Thanks for any help you can give.

    Plugin Author David Gewirtz

    (@dgewirtz)

    I’ll download the theme and see what I can find out. Give me a few hours. The coffee hasn’t yet started working.

    –David

    Plugin Author David Gewirtz

    (@dgewirtz)

    Okay, so here’s what I did.

    1. I created a brand new, fresh site. Updated everything to 4.2.1. including standard plugins and themes.
    2. I downloaded and installed Private Site from the www.ads-software.com repository
    3. I enabled it (just the main checkbox) and tested against the default WP theme. Worked fine. Then I turned it off.
    4. I then downloaded spacious directly from the WP depository using Add New in the Appearance/Themes menu
    5. Tested the theme to see what it was like before turning on Private site.
    6. Checked the main Private Site enable button and logged out. Got the login page with no errors, and logged in
    7. I went back into the plugin and turned on Site Home is visible to everyone?
    8. Once again logged out. This time I was able to go to the site’s home with no login screen.
    9. I then tried to go to the sample page, and got the login screen. I logged in and had access to the rest of the site.

    At no point in this process did I get any header error messages. So what aren’t you telling me? What other options do you have set? What other plugins?

    My recommendation at this point would be for you to repeat my test (I did it on a local XAMPP machine) and see if you get the same results. Alternatively, turn off everything else and see where you stand, and then step-wise turn things on and see what makes your site explode.

    Anyway, let me know what you discover. I’ll keep my test site spun up, so if you have more details I can try it out as well.

    –David

    Thread Starter revlow

    (@revlow)

    Thanks David. I did install some other plugins.

    1. Askimet
    2. Anti-Malware and Brute-Force Security by ELI
    3. Contact Form 7
    4. Flamingo
    5. Javascript Html and Text Adder
    6. Post Duplicator
    7. Really Simple CAPTCHA
    8. WordPress SEO
    9. — haven’t activated yet.

    10. WP Better Emails

    There are two I haven’t used before, Javascript Html and Text Adder and Post Duplicator. I’ve used similar ones so I can switch if these are the culprit.

    I’ll go through them one by one and get back to you. Gotta get some more coffee first. ??

    Thanks again!

    Thread Starter revlow

    (@revlow)

    Found a fix. Just one of those weird, let me try this again glitches.

    First I deactivated all the plugins except yours. No change. Then I changed the theme to WP 2015 — and got the correct login page. Deleted the Spacious theme from my server and reinstalled it. Bingo! It’s working. Go figure.

    Thanks again for all your help David. This plugin is just what I was looking for.

    Thread Starter revlow

    (@revlow)

    Just marking this “resolved”. I have another Q not related to this, so I’ll post it in another topic.

    Thanks again! ??

    Thread Starter revlow

    (@revlow)

    Oops. I forgot to tick “resolved”. ??

    Thread Starter revlow

    (@revlow)

    Well, this is weird. The error came back. Tried deleting and reinstalling the theme again, but this time it didn’t change — still getting the error. Any thoughts?

    Thread Starter revlow

    (@revlow)

    Hi David,

    Just to update you. I found another plugin that so far seems to be working. Fingers crossed.

    Thanks again,
    revlow

    Plugin Author David Gewirtz

    (@dgewirtz)

    Good luck. Let me know if you need or learn anything. I will download the plugin list you mention and see if I can repeat the problem here. Always useful to see if there’s anything conflicting.

    –David

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Getting the "Cannot modify header information" error’ is closed to new replies.