Support » Fixing WordPress » Header error generated via link-template.php

  • Resolved thesheep


    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?

Viewing 2 replies - 1 through 2 (of 2 total)
  • 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!

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


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Header error generated via link-template.php’ is closed to new replies.