WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Header error generated via link-template.php (3 posts)

  1. thesheep
    Member
    Posted 3 years ago #

    For single posts, I'm getting a HTTP header error that says:

    Warning: Header may not contain more than a single header, new line detected.

    It says that the error is in wp-includes/link-template.php on line 2239.

    Looking that up, it is the function wp_shortlink_header().

    It sounds like for some reason WP is trying to send a header that contains a newline character. I'm not sure how the variable $shortlink might end up with a newline character in it?

    My hosting server has PHP version 5.2.9 installed.

    I have tried removing my functions.php file (just to see if it was something I was doing) and that doesn't solve the problem.

    I notice that turning off pretty permalinks and reverting to default URL structure does get rid of the problem.

    Interestingly, I did a Google search for that header error text and got loads of results for WP sites out there that are displaying the same error - could this be a WP bug?

  2. thesheep
    Member
    Posted 3 years ago #

    Worked out what was going on here.

    I carelessly let a newline character creep into my SQL query when I was migrating from one domain to another, and inserted a newline into each post guid!

  3. francoisbourdon
    Member
    Posted 2 years ago #

    Hi! I have the same problem... How do I get rid of that newline character?

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic