• Resolved YSS3

    (@yss3)


    Hi,
    I am not sure if this is a problem but it seems so…

    My setup: I have set up WordPress in network (multisite) mode. Basically to try out changes on my beta site rather than the live site. So the theme is same and I have installed google analytics tracking code by creating a plugin using script that I think I found in one of the forums here. If this makes you feel that I am an expert, I give you a wrong impression. Last I did actual coding was more than 15 years back and that too in C, and not in professional capacity.

    Anyways, I installed this plugin and it seems to work fine if I login (go to /wp-login.php).

    However, if I directly go to the private site url (mysite.xyz/beta), I get the message: Warning: Cannot modify header information – headers already sent by (output started at /home/mysite/public_html/wp-content/themes/themename/page-templates/business.php:13) in /home/mysite/public_html/wp-includes/pluggable.php on line 1207

    How big a problem is this? Let me know if you need actual url or any other details.

    Ideal scenario: Ideally, I would like a message saying you are not authorised to see this page, or something to this effect. Another option could be redirection to /wp-login.php
    If I am required to create the login page, I don’t know how…

    Your views are welcome.
    Thanks.

    https://wordpress.org/plugins/jonradio-private-site/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author David Gewirtz

    (@dgewirtz)

    It’s a bit of a problem. Redirects work by changing the header of the page. If the header that does a redirect isn’t really in the header (because something else got in the way), it will break.

    My guess is that something got in the way of the redirect header. As for what, well, based on your description, it’s probably one of those scripts.

    –David

    P.S. Fire up a text editor and get back into programming. It can be a bit painful at first (it was for me after a break), but it’s really rewarding and keeps the brain cells fresh (as well as the available vocabulary of profanity).

    Thread Starter YSS3

    (@yss3)

    Thanks David.
    Will get back to coding, at least a little bit. Otherwise there are other things that keep me busy…

    PS: completely agree on keeping the brain cells fresh. No other work throws up so many problems. And the good part is most of them are solvable 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Warning: Cannot modify header information’ is closed to new replies.