WordPress.org

Ready to get started?Download WordPress

Forums

pluggable.php error? (4 posts)

  1. saladgoat
    Member
    Posted 2 years ago #

    I just added a block of code (found here) to functions.php, crossed my fingers and clicked Update. Nothing broke. The changes worked perfectly.

    Then I changed a portion of the code that outputs text to the page. No code was changed, only text. I clicked the Update button again and got this error message:

    Warning: Cannot modify header information - headers already sent by (output started at /hermes/waloraweb035/b2427/pow.ccrbernie/htdocs/ccr/wp-content/themes/live-music/functions.php:16) in /hermes/waloraweb035/b2427/pow.ccrbernie/htdocs/ccr/wp-includes/pluggable.php on line 881

    But the site still works, and the text changes I made were saved. I clicked the Back button and then clicked on the functions.php link in the right sidebar, to reload the file. Then made further text changes and clicked Update and still get this error message. But the new text changes were saved and the site still works.

    Any idea what is happening and, more importantly, how can I fix it?

    Thanks!

  2. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    If you have a caching plugin, that may be why...review line 16 of your functions.php file (cut the line and retype it manually and correctly)...this error is common when white space or a BOM has been pasted into the file.

  3. saladgoat
    Member
    Posted 2 years ago #

    I wasn't entirely sure what you said (BOM?) but I checked the functions.php and I had added the whole code after the whole code of the original functions ... meaning I had:

    <?php
    {original functions}
    ?>

    <?php
    {new code}
    ?>

    I don't know enough about php to know if that was totally wrong, but when I deleted the middle bit and had all the code in one section, such as:

    <?php
    {original functions}

    {new code}
    ?>

    ...everything worked again.

    So, if that's what you meant, thank you!
    If it's not what you meant, thanks for putting me on the right direction. :)

  4. Pioneer Valley Web Design
    Member
    Posted 2 years ago #

    Glad you worked it out

Topic Closed

This topic has been closed to new replies.

About this Topic