WordPress.org

Ready to get started?Download WordPress

Forums

Auto Post Thumbnail
[resolved] WordPress 3.4: Stopped Working, Thumbnails Missing (87 posts)

  1. kb4i
    Member
    Posted 1 year ago #

    where i will put this code plzz??????
    DELETE FROM wp_postmeta WHERE meta_key = '_thumbnail_id';

  2. TMPTEAM
    Member
    Posted 1 year ago #

    Help!! all images lost.. wht to do?

    [Please stop posting in uppercase. It's the electronic equivalent of shouting and is considered quite rude. Post de-capped.]

  3. oomskaap
    Member
    Posted 1 year ago #

    @kb4i You have to logint o your myphpadmin in cpanel on your hosting company. Click your database, then SQL and paste those words in the SQL query box, and click "GO" . but backup your database before you do it to be safe.

  4. TMPTEAM
    Member
    Posted 1 year ago #

    ok thanx a ton! thx DanStudio works like a charm ;)

  5. Dave
    Member
    Posted 1 year ago #

    http://wordpress.org/support/plugin/thumbnail-for-excerpts

    Is having similar problems. All thumbs gone.

    I imagine there might be a few more thumbnail plugins having issues too.

    update_attached_file( $thumb_id, $new_file );

    from misthero seemed to work for Auto Post Thumbnail on new thumbnails.

    Anyone want to expand on if there is a key code that's changed in the WP update that might lead to some fixes on other plugins?

  6. misthero
    Member
    Posted 1 year ago #

    @Dave i don't use that plugin but the logic is the same, just change the variable names to reflect the one used in the function:

    that should be:
    update_attached_file( $idimg, $fullsizepath );

    add it after line 258 (thumbnailforexcertps.php), the result should be like this:

    wp_update_attachment_metadata( $idimg, wp_generate_attachment_metadata( $idimg, $fullsizepath));
    update_attached_file( $idimg, $fullsizepath );

    again, i don't use that plugin, and don't know if it works, try it and good luck.

  7. Richard
    Member
    Posted 1 year ago #

    @gothickmatt Your first method worked for me thanks!

  8. feedsoo
    Member
    Posted 1 year ago #

    Hi,

    I used this SQL query
    DELETE FROM wp_postmeta WHERE meta_key = '_thumbnail_id';

    with this all attached images thumbnails working but youtube videos thumbnails are not working.

  9. Kevin Muldoon
    Member
    Posted 1 year ago #

    Adding update_attached_file( $thumb_id, $new_file ); to the plugin file seems to be the best solution. I'm actually using the auto featured image plugin but they seem to be very similar.

    I've found with auto featured image 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 just now though perhaps will be in the future.

  10. Dave
    Member
    Posted 1 year ago #

    @misthero Just tried out your code and so far so good on thumbnails for excerpts too!

    Excellent stuff, and many thanks for putting in the time to look.

    I'm putting the whole thing through some tests to make sure there's nothing else being effected. But it all looks good so far.

    I'll post on the excerpts plugin forum too with full credit to you.

    Many thanks again.

  11. kb4i
    Member
    Posted 1 year ago #

    i put this code in sql and executed (Go) DELETE FROM wp_postmeta WHERE meta_key = '_thumbnail_id';
    and i regented the plugin Auto Post Thumbnail but the same problemme no Thumbnail , i use the news today template and we have a choice in his option type of Thumbnail : *native Thumbnail " or "timthumb" , i try this two option but no Thumbnail , help us plz

    [No bumping. If it's that urgent, consider hiring someone.]

  12. tariquesani
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Folks,

    If the original developer Aditya who worked with us when he developed this does not respond in a few days I will fork this and provide a fix

  13. Zonkes
    Member
    Posted 1 year ago #

    Bit confused.

    I added the code to the plugin file.

    Is there not some query I can run to re-attach all the old thumbnails back to their posts.

    Otherwise supposedly I have to :

    Delete all my old thumbnails from /uploads
    Run SQL query to delete them as featured images
    Run Auto Post Thumbnail again to generate thumbnails.

    I remember that when I first ran autothumbnail it attached the full size images into the posts and not thumbnails. So I ended up having to manually add everything.

  14. raissuli
    Member
    Posted 1 year ago #

    tariquesani tks!

    Since I'm not a programmer, only a final user, an update is going to be nice. I think it's not safe for me to mess with the page codes after all :-)

  15. BNOTP
    Member
    Posted 1 year ago #

    Same here. I'm in need of an update for this plug-in...don't dare touch any code. Hope one is coming soon. Thx

  16. tariquesani
    Member
    Plugin Author

    Posted 1 year ago #

    Download a fixed version from here

    It just has the fix as outlined by misthero - so all thanks to him. As usual all caveats apply! Keep a backup of your database and cross all your fingers etc ;-)

    I do intend to develop this further and add a few features but that is for another day. Do let everyone know how this goes

  17. BabyBugsnBerries
    Member
    Posted 1 year ago #

    For someone that is new to websites and has no background in coding, this is slightly Greek! @tariquesani do I just add it as a plugin?
    *very frustrated*

  18. tariquesani
    Member
    Plugin Author

    Posted 1 year ago #

    @BabyBugsBerries - this is a drop in replacement for the original plugin. If you have it installed the original replace it with this via ftp. If have not installed it as yet - upload and then activate it from the admin

  19. BabyBugsnBerries
    Member
    Posted 1 year ago #

    @tariuesani it hasnt worked, they are still stuck

  20. BabyBugsnBerries
    Member
    Posted 1 year ago #

    please help! I really need to get this fixed by Wednesday at the latest! wish I had never upgraded!

  21. tariquesani
    Member
    Plugin Author

    Posted 1 year ago #

    What do you mean by they are stuck?

    If you have old posts which are showing broken images you will have to delete the images from Media and then use the plugin option to regenerate thumbnails

  22. Neil Paterson
    Member
    Posted 1 year ago #

    Hi all

    I've just posted about a fix that worked for me which doesn't involve deleting the old images and so is Google-friendly!

    http://www.clickthrough-marketing.com/how-to-fix-auto-post-thumbnail-on-wordpress-3.4-seo-friendly-800610805/

    It fixes thumbnails for existing posts and should be run once. @tariquesani's hotfix should then be applied.

    Kind regards

    Neil

  23. thelearnedfoot
    Member
    Posted 1 year ago #

    Thumbnails are the main way my site's archive operates and functions, so I definitely needed to get this fixed ASAP. After backing up my database just in case, I disabled the auto-post-thumbnail plugin and manually made the fix suggested by misthero. I then re-activated the plugin. I then copied and ran the php script Neil wrote to replace and re-generate the broken thumbnails. Both seem to have worked perfectly - my site is fully functioning just as it was before upgrading to 3.4, all the thumbnails are back, and I tried a sample new post and it automatically attached the first image. Anyway, I wanted to just say THANK YOU for being so generous as to write - and share - a fix with those of us who are basically php clueless. :)

  24. lyricalbiz
    Member
    Posted 1 year ago #

    Thank you so much for the updated version, @tariquesani! It works like a charm. Just delete all the blank media from the library and run the Auto Post Thumbnail plugin again and everything comes back.

    Here's that link again for the update:

    Auto Post Thumbnail for WP 3.4

  25. misthero
    Member
    Posted 1 year ago #

    You are welcome! Knowledge, including arts and code should always be shared, public, accessible and free. This is what makes humanity progress and human being great. :) :)

  26. tariquesani
    Member
    Plugin Author

    Posted 1 year ago #

    @clickthroughmarketing - thanks great job :-)

  27. dopestnerds
    Member
    Posted 1 year ago #

    I also updated my site, and i cant seem to figure out the problem, anyone can help m out? dopestnerds.com

  28. drummergirl
    Member
    Posted 1 year ago #

    I just upgrade to 3.4 tonight and ran into the same problem. The fixes above didn't seem to do anything to my site.

    I think it's because most of my missing images are not inserted into the post anywhere so they don't get regenerated. They were simply attached to the post as the featured image (custom post types set up as product pages).

    I did use the auto-generate thumbnails plugin at one point, but then began manually attaching the images and dumped the plugin. Several of the missing images show up as 0px x 0px. Could that be the problem and is there an easy way to edit the database to get them to appear again?

    The thumbs are still there in my directory and if I paste in the image link, it shows in my browser... It just doesn't show in the media library or on the front end.

    Is there a way to reattach these images or do I have to go through and do this manually? I'm talking hundreds of product images, so any help would be appreciated.

  29. drummergirl
    Member
    Posted 1 year ago #

    To clarify - they are still attached to the post, they just don't show up.

  30. BNOTP
    Member
    Posted 1 year ago #

    The fix that finally worked for me was deleting all the missing images from the Media library (thanks lyricalbiz) and running the update. It didn't seem to work until I deleted all the missing images from the library. Out of 850 thumbnails, it fixed all but 175. Those I had to fix one-by-one. I pray the next WP update that comes along doesn't cause this again. Any way to predict if this will happen again?
    Thanks so much for everyone's help!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic