WordPress.org

Ready to get started?Download WordPress

Forums

WPBook
Cant get thumbnails into a sheduled post (4 posts)

  1. meydot
    Member
    Posted 2 years ago #

    Debug code for the sheduled publish:

    2012-06-05 08:14:33 : publish_to_facebook running, target_admin is 100000895606603
    2012-06-05 08:14:33 : Post ID is 7041
    2012-06-05 08:14:33 : My permalink is http://www.apps-android.info/kostenlose-apps/knobelspiele-mit-streichhlzer/
    2012-06-05 08:14:33 : Get Post Thumbnail function does not exist, or no thumb.
    2012-06-05 08:14:33 : Post thumbail is.
    2012-06-05 08:14:33 : Post share link is.
    2012-06-05 08:14:33 : Past stream_publish, fb_response is.
    2012-06-05 08:14:33 : Publishing to page 141804872542666
    2012-06-05 08:14:33 : Publishing to page, image is..
    2012-06-05 08:14:36 : Just published as page to api, fb_response is Array

    Same article with manual publishing:

    2012-06-05 11:25:10 : publish_to_facebook running, target_admin is 100000895606603
    2012-06-05 11:25:10 : Post ID is 7041
    2012-06-05 11:25:10 : My permalink is http://www.apps-android.info/kostenlose-apps/knobelspiele-mit-streichhlzer/
    2012-06-05 11:25:10 : function exists, and this post has_post_thumbnail - post_Id is 7041.
    2012-06-05 11:25:10 : my_thumb_id is 7043.
    2012-06-05 11:25:10 : my_image is http://www.apps-android.info/wp-content/uploads/Screenshots/knobelspielemitstreichhlzer.png.
    2012-06-05 11:25:10 : Post thumbail is http://www.apps-android.info/wp-content/uploads/Screenshots/knobelspielemitstreichhlzer.png
    2012-06-05 11:25:10 : Post share link is.
    2012-06-05 11:25:10 : Past stream_publish, fb_response is.
    2012-06-05 11:25:10 : Publishing to page 141804872542666
    2012-06-05 11:25:10 : Publishing to page, image is http://www.apps-android.info/wp-content/uploads/Screenshots/knobelspielemitstreichhlzer.png.
    2012-06-05 11:25:12 : Just published as page to api, fb_response is Array

    Where has the function or thumbnail gone, when I used sheduled publishing? All sheduled posts have random images.

    http://wordpress.org/extend/plugins/wpbook/

  2. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    Hmm. That's certainly odd. So when you are actively publishing, the post thumbnail exists, when when a scheduled publish occurs, for some reason WPBook doesn't find it.

    Does your theme (outside of WPBook) use post thumbnails? Specifically, does your theme's functions.php include something like this:

    if(function_exists('add_theme_support')) {
         add_theme_support('post-thumbnails');
         }

    If not, please add it.

    Here's the relevant section of wpbook/includes/publish_to_facebook.php:

    if (function_exists('get_the_post_thumbnail') && has_post_thumbnail($my_post->ID)) {

    The message in debug is the 'else' to this 'if' - so given that the post ID is correct, why would has_post_thumbnail fail?

    See http://codex.wordpress.org/Function_Reference/has_post_thumbnail - it's been in since 2.9.0 and should work.

    Let me know about your theme.

  3. meydot
    Member
    Posted 2 years ago #

    I already added add_theme_support('post-thumbnails'); but it doesnt work in this blog for sheduled posts.
    I have 3 blogs with the same theme and identical functions.php. 2 blogs work with wpbook, the third doesnt. I dont know why.

    I tried a workaround in your publish_to_facebook.php, but in all cases get_the_post_thumbnail doesnt exist in sheduled posts.

    Now I installed the plugin FPW Post Thumbnails in this blog and the right thumbnail appears on facebook. But why? The themes for all blogs are the same. All of them have add_theme_support('post-thumbnails') in their functions.php. All based on WP 3.3.2 and all of them have the same plugins installed. I cant find any differences between these 3 blogs.

  4. johneckman
    Member
    Plugin Author

    Posted 2 years ago #

    Did the other 2 (which worked, I assume, without FPW Post Thumbnails) blogs have other plugins related to post thumbnails?

    Are your post thumbnails unique in some way on the third blog?

    They all have the same plugins and the same theme? Same versions, to?

    I've no idea what would cause this to fail in some circumstances and not others - maybe the failure isn't in get_the_post_thumbnail but in the has_post_thumbnail part of the if statement? I guess that could fail under some circumstances for a given post ID, though I don't know why it would.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.