WordPress.org

Support

Support » Plugins and Hacks » Auto Featured Image » [Plugin: Auto Featured Image] Thumbnails not showing after upgrade to 3.4

[Plugin: Auto Featured Image] Thumbnails not showing after upgrade to 3.4

Viewing 15 replies - 1 through 15 (of 27 total)
  • For the auto featured image plugin you need to delete all the broken, grey’d out unattached thumbnails from your media library.

    Then edit line 202 of auto-featured-image.php – find this:

    wp_update_attachment_metadata( $thumb_id, wp_generate_attachment_metadata( $thumb_id, $new_file ) );
    
    return $thumb_id;

    Replace with this:

    wp_update_attachment_metadata( $thumb_id, wp_generate_attachment_metadata( $thumb_id, $new_file ) );
    update_attached_file( $thumb_id, $new_file );
    return $thumb_id;

    Upload the plugin, find the settings page and regenerate the thumbnails.

    FYI – Misthero actually came up with the fix for the Auto Post Thumbnails plugin, but it also works for this one.

    Adding update_attached_file( $thumb_id, $new_file ); to the plugin file seems to be the best solution.

    I’ve found that whilst the solution works and attaches images to posts, all auto generated images are still unattached. This doesn’t seem to be a problem with displaying images just now though perhaps will be in the future.

    Any idea what needs to be changed to ensure new images are attacked to their corresponding post?

    Yeah, the images are unattached in the media library but they appear properly as the featured image in the post. I haven’t looked at attaching them to the post yet as getting my sites working was top priority for me. I’ll update here if I find a solution for that.

    Thanks Paul. I’m looking at the image.php file in the admin includes folder and checking to see if I can work this out.

    I’m deleting thousands of images from around 4 websites that use the plugin and then need to regenerate them. I don’t want to go through it again so I’d prefer to get posts attached before hand before regenerating everything.

    I feel your pain, had to do the same thing for thousands of images across our sites this morning. Let me know if you find a solution before I do 🙂

    Will do. I’m going to write an article about it on http://www.wpmods.com but I want to make sure I have everything resolved before doing so. Nothing seems to be jumping out at me as being wrong though!! 🙂

    Thanks for the advice — I was trying to solve this all day:

    http://wordpress.org/support/topic/media-directory-change-paths-and-database

    Your solution worked!

    Just wanted to confirm that the above works better with Auto Post Thumbnail.

    Auto Post Thumbnail not only adds the photo as featured, but also attaches it correctly to the post. However, auto post thumbnail does not have video support that Auto Featured Image does. We’ll be comparing and contrasting the two and adding the video functionality to Auto Post Thumbnail for our clients. If we have some time today, I’ll make sure someone comes back and writes it out for you guys to copy and paste into your copy, if you’d like.

    That would be fantastic crushlabs. I’ve found that auto featured image isn’t working well at all now. Thumbnails aren’t being assigned to draft posts and many other posts are missing thumbnails too. It seems very erratic.I’ve tried a few other solutions today but none seem to work that well.

    If auto post thumbnail works with video, I’d definitely switch over 🙂

    I second Kevin on that crushlabs. If Auto Post Thumbnail supports YouTube and Vimeo videos I’d switch in a heartbeat 🙂

    It’s bizarre. The auto featured image seems to be working well on one of my websites but on the others it’s not. No images are attached on any site though.

    Any luck with this Crushlabs?

    I have a long list of unattached, greyed out images to delete and would rather not have to do this. Is there an easier solution? And where do we add the

    update_attached_file( $thumb_id, $new_file ) line?

    Thanks

    Cynthia

    Cynthia, as far as I know there is now easier solution and the code has to go in the auto-featured-image.php at line 202.

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘[Plugin: Auto Featured Image] Thumbnails not showing after upgrade to 3.4’ is closed to new replies.
Skip to toolbar