Forums

[resolved] Header already sent by post-template.php (8 posts)

  1. merlinsilk
    Member
    Posted 1 year ago #

    After upgrading to 3.0 and trying to do a new post I get this error:

    Warning: Cannot modify header information - headers already sent by (output started at /home/merlinsilk/domains/merlinsilk.com/public_html/wp-includes/post-template.php:54) in /home/merlinsilk/domains/merlinsilk.com/public_html/wp-includes/pluggable.php on line 890

    I checked the usual suspects - spaces before or after <?php ?> but non of that. Checked if it was my older template, but it does the same thing with the new default template.

    Then looking into the file where the error occurs I find

    function the_title($before = '', $after = '', $echo = true) {
    $title = get_the_title();
    if ( strlen($title) == 0 )
    return;
    $title = $before . $title . $after;
    if ( $echo )
    echo $title;
    else
    return $title;
    }

    and the error occurs on the echo $title. If I replace the echo with a return the error disappears, but I don't want to leave it at that as this will probably cause problems elsewhere.

    A brand new installation on the same server does not display that error.

    Any idea - I am puzzled.

    Cheers,
    Merlin

  2. James
    Happiness Engineer
    Posted 1 year ago #

    Try downloading WordPress again and replace your copy of the /wp-includes/post-template.php file with a fresh one from the download.

  3. merlinsilk
    Member
    Posted 1 year ago #

    thanks for the answer. Yeah, that was one of my first thoughts as well, but they are identical, and, as a bit of further info, the same files used for a new installation are working just fine.

    Any further thoughts?

  4. James
    Happiness Engineer
    Posted 1 year ago #

    Try decativating all plugins. If that resolves the issue, reactivate each one individually until you find the cause.

  5. merlinsilk
    Member
    Posted 1 year ago #

    Thanks, macmanx!
    It was caused by the plugin

    Lucia's LinkLove

    Now I'm a happy camper ;-)

  6. James
    Happiness Engineer
    Posted 1 year ago #

    You're welcome!

  7. timmyjohnboy
    Member
    Posted 1 year ago #

    Wow, thanks for this! Same plugin was giving me the error.

  8. ifeelgod
    Member
    Posted 1 year ago #

    Found this little piece of trickery worked to resolve the problem for me!

    I had done all the steps of looking for white space etc. and nothing was fixing the problem.

    Finally, I disabled the plug-ins and wham bam problem went away. The apparent offender was Lucia'sLinkLove.

    Hope this helps someone

    In Him,
    JMb <><

    [Very large sig moderated as per the Forum Rules]

Topic Closed

This topic has been closed to new replies.

About this Topic