WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Previous commenter gets "Cannot modify header information" error (5 posts)

  1. badrad
    Member
    Posted 8 years ago #

    Hi, I am working on setting up my first WordPress site (using 2.0 RC1).

    When submitting a comment, if the user has a previous comment and is not an administrator, they get the following errors:

    -----------------------------------
    Warning: strpos() [function.strpos]: Empty delimiter. in /home/c0dy10/public_html/wp-includes/comment-functions.php on line 867

    Warning: Cannot modify header information - headers already sent by (output started at /home/c0dy10/public_html/wp-includes/comment-functions.php:867) in /home/c0dy10/public_html/wp-comments-post.php on line 54

    Warning: Cannot modify header information - headers already sent by (output started at /home/c0dy10/public_html/wp-includes/comment-functions.php:867) in /home/c0dy10/public_html/wp-comments-post.php on line 55

    Warning: Cannot modify header information - headers already sent by (output started at /home/c0dy10/public_html/wp-includes/comment-functions.php:867) in /home/c0dy10/public_html/wp-comments-post.php on line 56

    Warning: Cannot modify header information - headers already sent by (output started at /home/c0dy10/public_html/wp-includes/comment-functions.php:867) in /home/c0dy10/public_html/wp-includes/pluggable-functions.php on line 178
    -----------------------------------

    The comment is entered correctly, the redirect breaks.

    I have not modified the three files referenced. To be absolutely sure, I redownloaded them and uploaded them - same problem.

    In fact, I have only modified one file outside of templates, and that is kses.php, and just to be sure, I tried replacing that with a stock one and the problem still occurs.

    Any help would be awesome.

  2. badrad
    Member
    Posted 8 years ago #

    And I meant this to be in the troubleshooting forum, a moderator can feel free to move this.

  3. badrad
    Member
    Posted 8 years ago #

    Solved it.

    strpos on line 867 of comment-functions.php was failing because get_settings('moderation_keys') was blank.

    I had to go into Options->Discussion and add at least one word to the comment moderation word list.

  4. Dalton
    Member
    Posted 8 years ago #

    Whoa, that was a weird one. Thanks for the heads up, that fixed it for me too.

  5. badrad
    Member
    Posted 8 years ago #

    Cool, glad it helped you.

    I filed it as a bug:
    http://trac.wordpress.org/ticket/2021

    But it so far seems to have been completely ignored.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.