WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Auto Post Thumbnail] no featured thumbnail appears (18 posts)

  1. ddeconin
    Member
    Posted 3 years ago #

    I get the "generate thumbnails" progress bar, but no featured thumbnail appears. Is there a way I can 'debug' this ?

  2. ddeconin
    Member
    Posted 3 years ago #

    I also found that I have entries in wp_postmeta with the meta_key '_thumbnail_id' but still they don't appear in the admin panel.

  3. adityamooley
    Member
    Posted 3 years ago #

    If the entry is getting added in database table, then make sure that you have added

    add_theme_support( 'post-thumbnails' );

    in your theme's functions.php file.

  4. ddeconin
    Member
    Posted 3 years ago #

    I had already done that. I know that that works since I can explicitly add a featured thumbnail to a post (through the gui) and then I see it , but I don't see the featured thumbnail for a thumbnail added with the Auto Post Thumbnail plugin.

    Also , when coding for thumbnails in my theme I found that :
    has_post_thumbnail will return true for all thumbnails ( manual and auto generated ones ) but
    <?php the_post_thumbnail('thumbnail',array('class' => 'left','alt' => ''.get_the_title().'','title' => ''.get_the_title().'')); ?>
    will only return a thumbnail for the posts where I manually added one.

  5. adityamooley
    Member
    Posted 3 years ago #

    That's strange. I checked with the exact same code given above and it worked for me. You may want to debug a bit the_post_thumbnail() function to check whether things are going wrong in your case.

    Do you let me know if you come across any issues.

    Aditya

  6. ddeconin
    Member
    Posted 3 years ago #

    The issue seems to be with the fact that I had copied the data from another blog using export/import. I used the steps I found in the codex to modify the url's of the images inside the post and was able to re-add the images in the media library using another plugin, now there are no links between the images in the post and the media library. I guess that since there is no actual link, your plugin is not able to perform all steps involved in setting the featured thumbnail.
    l tried your plugin on the original blog an there it worked.
    One feature request: In the batch processing, an 'override' current post thumbnail might be handy.

  7. adityamooley
    Member
    Posted 3 years ago #

    Thanks for the update. Really appreciate your efforts to debug the issue.

    On technical note, the plugin first tries to find whether the image is uploaded from local media by checking for a special CSS class of the format wp-image-xxx where xxx is the thumbnail id from media library. If it finds such a thing in image, it just makes it a featured thumbnail. Since you have done so much processing on posts, something might have changed in these ids and thus the plugin is unable to link it correctly.

    Regarding the new feature, I like the idea. Will surely try to implement this in the next release.

    Aditya

  8. santanuc
    Member
    Posted 3 years ago #

    Hi Aditya,
    I am trying to use your plugin but am not being able to generate the thumbnails. I am using the Gemer theme. Any ideas why this might be happening?
    Thanks,
    Santanu

  9. jazbek
    Member
    Posted 3 years ago #

    Hi Aditya,
    Your plugin does not seem to be working for me. So I can understand what the problem is, can you tell me where it looks for wp-image-xxx?

  10. adityamooley
    Member
    Posted 3 years ago #

    @jazbek - The code related to this can be found in wp-content/plugins/auto-post-thumbnail/auto-post-thumbnail.php on line 254. But before that, try the update I released today, 19th Jan, 2011. Might work for you as I have added extra checks for generating thumbnail.

    Let me know how it goes.

    Aditya

  11. jazbek
    Member
    Posted 3 years ago #

    Thanks for the reply. I went to the plugin page and it said last updated 2010-12-2. Where can I get the latest release?

  12. adityamooley
    Member
    Posted 3 years ago #

    Ah. That's strange. The date on the plugin page hasn't changed but the version number is new. Click and Download Version 3.2.2 and I am sure you will get the latest version.

  13. meshedup
    Member
    Posted 3 years ago #

    hi
    i used the plugin first time and it worked..
    i deactivated the plugin and all my only generated images are gone !!!
    again i am unable to generate any images...
    Also i have not added any image via media uploader...i used an rss imported ...but all the images are cached on my server

    is there a way to generate thumbs usin the first image in the post...but again as i said this image was not uploaded manually so it would not have any ID

    thanks....its a wonderful plugin
    but its bugging me...any help would be greatly appreciated

    regards,
    pepe

  14. meshedup
    Member
    Posted 3 years ago #

    figuered it out....the plugin is not generating featured images of already generated images or scanned posts....

    I deactivated the plugin...and now when i want to auto generate for previous posts its not hapening !!

    is there a way or a option to generate images of already scanned posts...
    may be some database clearing or anything?

  15. adityamooley
    Member
    Posted 3 years ago #

    Right now there is no way to generate featured/post thumbnails for posts that already have the thumbnails. I hope you have gone through the Auto Post Thumbnail option under Settings menu which generates thumbnails for existing posts.

    Also, the latest release doesn't just depend on the ID as discussed above. The plugin now scans the database before trying to duplicate the image.

  16. meshedup
    Member
    Posted 3 years ago #

    thanks for the quick reply.....

    yeah for the first time i used the auto post thumbnail to generate images.
    Then the images appeared.....
    but i deactivated the plugin and all the featured images set the plugin were gone ? is this the normal behaviour of the plugin ?

    also i activated the plugin again....tried to generate featured images again....the progress bar says 83 processed posts...but i have some 254 published posts ?

    as you said....

    The plugin now scans the database before trying to duplicate the image.

    but in my case i need the plugin to scan again and forcibly duplicate images.....is there a way to do this ?

  17. ddeconin
    Member
    Posted 3 years ago #

    Hi adityamooley,
    Due to lack of time I have not yet gotten to the bottom of my problem with the media library (see above).
    I wanted to add some way to log some debug entries in a file your plugin to see what it does when excuting the code to the scan, but I could not find how.
    How do you debug the plugin ? I tried creating and opening a file and then log entries in there, but I cannot get it to work.

    Thx,

    D.

  18. ddeconin
    Member
    Posted 3 years ago #

    Hi,
    I figured it out finaly. When I moved the blog and I copied the pictures the thumbnail has an ID in the metadata that is not found anymore in the metadata.
    I temporary edited the plugin code so that it would not look for that, but instaid go straight to the code piece where it adds the thumbnails to the media library from the url.
    I guess I could start from your plugin and make a re-populate media library out of that.

Topic Closed

This topic has been closed to new replies.

About this Topic