Support » How-To and Troubleshooting » Images in comment don't show after upgrade to 3.05

Images in comment don't show after upgrade to 3.05

  • Hello,

    First, thanks for WordPress, best CMS on the net!

    After upgrading to WordPress 3.05 from version 3.04, the images that were in my comments no longer show up. To make sure it was the upgrade, I installed WordPress 3.04 on a new domain, no plugins.

    I added a picture to a post and to that post’s comment. The picture in the post and the comment show without problems.

    I then upgraded to version 3.05. When I view the same post and comment, the image in the post shows but the image in the comment does not.

    My temporary solution was to copy these files back from 3.04:

    Hope that helps!

Viewing 10 replies - 1 through 10 (of 10 total)
  • I’ve done a bit more research and found that one of the changes in 3.05 was to the filtering of html in comments for administrators, perhaps in the kses.php file?

    I thought that maybe a setting the functions.php of my theme, something like:
    remove_action(‘comment_text’, ‘wp_filter_nohtml_kses’, 10);
    (or is it remove_filter?)
    I’m not sure what the proper syntax is, but I’m afraid this would defeat the purpose of the file.

    Is there a way to allow admins to keep the images that were included in the comments? If I upgrade now, all the images visitors asked me to include in their comments are lost.


    Any suggestions?

    Same problem here.

    On upgrading to 3.05 I also lost images and videos posted in the comments by users and admins.

    I have since rolled-back to 3.04 as a temporary fix.

    Copy back only the
    from 3.04 seems to fixed it.

    So what in default-filters.php needs to be changed and how do we exclude that in our themes functions.php?


    Sorry, no real help here.
    The only difference in “default-filters.php” seems to be one extra line in the 3.0.5 version: it is the second line starting with “foreach” just after “// Keys”. If Stealingisbad is right the temporary cure might be narrowed down to just commenting away this line.
    (I haven’t yet checked this thoroughly.)

    foreach ( array( 'pre_post_status', 'pre_post_comment_status', 'pre_post_ping_status' ) as $filter ) {
    	add_filter( $filter, 'sanitize_key' );

    I was wrong! Leave the obovementioned line in place.

    In default-filters.php of WP305
    under “// Kses only for textarea admin displays”
    replace , 'comment_text'
    by /* , 'comment_text' */
    (or remove it altogether if you like)

    Now the pictures in admin comments show up again!

    Take care, I did not check for any side effects of this amputation.

    You are my new hero 🙂

    Thanks for taking the time Zaaikort!

    We did it together! Without even knowing what the code means.

    For those of you who can decipher Dutch:
    someone else has been tackling the same problem and has taken it a little further,

    (1) The filtering-out of pictures in WP 3.0.5 is a safety measure, not a bug.
    (2) If you are the only admin of your WP, and your visitors are not given more status then ‘subscriber’, and all plugins are bonafide, then it is safe to amputate the piece of code. Safe enough for me anyway.

    Is this ‘topic resolved’ now? What do you folks think?

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Images in comment don't show after upgrade to 3.05’ is closed to new replies.