WordPress.org

Ready to get started?Download WordPress

Forums

Bit.ly Shortlinks
[resolved] Error in header (25 posts)

  1. Dalton
    Member
    Posted 3 years ago #

    I don't know if the plugin supports 3.1 yet, I'm sure there's still some testing to do. I get the following error on my single post page when I activate the plugin:

    Warning]: Header may not contain more than a single header, new line detected. in /home/user/public_html/website/wordpress/wp-includes/link-template.php on line 2435

    Thanks for any insight you can provide. I'll deactivate it for now.

    Dalton

    http://wordpress.org/extend/plugins/bitly-shortlinks/

  2. Nicolas Messer
    Member
    Posted 3 years ago #

    I do get the same error. Using the latest stable version of WP and this Plugin.

    Warning: Header may not contain more than a single header, new line detected. in /wp-includes/link-template.php on line 2239

  3. jackstin
    Member
    Posted 3 years ago #

    We get the same error.

    Warning: Header may not contain more than a single header, new line detected. in html/wp-includes/link-template.php on line 2239
  4. Kristof
    Member
    Posted 3 years ago #

    Add one more to the list - I encountered the same exact issue.

  5. QimBiz
    Member
    Posted 3 years ago #

    I'm still on WP3.0.4.
    I have this problem as well. It does not appear on posts page.
    Unfortunately I am not able to pinpoint the problem as well.

  6. brubrant
    Member
    Posted 3 years ago #

    Same here.

    Using WordPress 3.1 RC + Hybrid Core + Prototype

    My error:

    Warning: Header may not contain more than a single header, new line detected. in /home7/webtwosp/public_html/mundowp/wp-includes/link-template.php on line 2435

  7. erikluyten
    Member
    Posted 3 years ago #

    And YES, one more... 'Sup with this?

  8. Syed Balkhi
    Member
    Posted 3 years ago #

    Add one more the list ...

  9. perezfigueroa
    Member
    Posted 3 years ago #

    I'm using 3.0.4 and I have the same proble with plugin

    Warning: Header may not contain more than a single header, new line detected. in html/wp-includes/link-template.php on line 2239

    Suggestions? Thanks!

  10. jaledwith
    Member
    Posted 3 years ago #

    Me too! I use WP 3.0.4.

  11. chrisjernigan
    Member
    Posted 3 years ago #

    Same here. I can't believe there is no response yet when this many people are having the same problems. Is anyone listening? HELP PLEASE!

  12. Chuck Reynolds
    Member
    Posted 3 years ago #

  13. Joost de Valk
    Member
    Plugin Author

    Posted 3 years ago #

    If some could try to change line 13 to:

    $short = trim( get_post_meta($id, '_yoast_bitlylink', true) );

    ( adding in the trim() )

    if that fixes it I'll push out a fix to wp.org

  14. jackstin
    Member
    Posted 3 years ago #

    @joostdevalk - Sorry to bug you more about this, just trying to get it working. I tried changing line 13 to: what you provided above.

    Same Error:
    Warning: Header may not contain more than a single header, new line detected. in html/wp-includes/link-template.php on line 2239

    When you get some time to look into this, I can help to troubleshoot this error.

  15. Joost de Valk
    Member
    Plugin Author

    Posted 3 years ago #

    Hmm ok, the weird thing is I'm not getting the error myself so I'm having a hard time replicating and/or fixing it. Anyone want to give me access to their site so I can see the problem "live"? If so, please email me through my site's contact form:

    http://yoast.com/contact/

    Cheers

  16. Chris
    Member
    Posted 3 years ago #

    Plug-in seems to work fine except for one thing:

    In the new admin header introduced with WP 3.1, whenever I try to click the first option from the "Bit.ly" navigation item, the javascript prompt does not appear, and the page reloads instead. Any idea why this might be happening? Any help is appreciated.

  17. drperil
    Member
    Posted 3 years ago #

    ... I deactivate the plugin and reactivated it and the problem was gone. [shrug]

  18. Rebecca Markowitz
    Member
    Posted 3 years ago #

    We also get the error. Any chance you'll fix it soon and release an upgrade?

  19. blogologist
    Member
    Posted 3 years ago #

    The problem is that bit.ly sends a bad character back from the API call. Not entirely sure which one, but it's fixed by changing one line of the plugin file. Easy :)

    Change line 21 of the bitly.php file from:

    $short = $resp['body'];
    ...to...

    $short = ereg_replace("/\n\r|\r\n|\n|\r/", "", $resp['body']);

    Cheers,

    -Alister

    http://about.me/alicam

  20. staze
    Member
    Posted 3 years ago #

    Testing blogologist's fix... so far, so good... but then, I didn't see the error consistently.

  21. blogologist
    Member
    Posted 3 years ago #

    Staze,

    My mod can't break it. It will only remove any CR or LF or combo, if found.

    Cheers,

    Alister

  22. staze
    Member
    Posted 3 years ago #

    didn't think it would.

    the change does indeed seem to have fixed the issue. Thanks for the detective work. Hopefully Yoast will integrate this, or something similar, into his codebase.

  23. Ethan Shaw
    Member
    Posted 2 years ago #

    @blogologist Thanks for the fix!

  24. coffeemonk
    Member
    Posted 2 years ago #

    I implemented a similar, but simpler fix to the one blogologist suggested, doing this instead:

    $short = trim($resp['body']);

    this is similar to what joostdevalk suggested, but on the creation end (when getting it from the API) as oppposed to the retrieval end (when getting it from the WP database).

    using trim will also deal with other stray whitespace characters besides CR/LF.

  25. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Should be fixed in 0.2, just released.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic