Forum Replies Created

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi John,
    it was another plugin. I’ve the ‘SI CAPTCHA Anti-Spam’-plugin which intercepts the comments at preprocess_comments. As your plugin doesn’t give the captcha-code with it (because it obviously can’t), that plugin is blocking the comment-insertion.
    So I have two options:
    1. Disable SI CAPTCHA which would result in flooding my blog with spam
    2. Comment out that line in your plugin which works fine for me

    I chose the second option :o)

    The umlauts are working fine for me. They are just shown wrong in the debug-file.

    Hi John, sadly I was wrong with the user_ID-thing. I missed out that the apply_filters-line was still commented out in my file. So even with user_ID = ” it is not working. I will do some more debugging on that issue in the next days. Maybe it’s a problem with my theme. I read that some things on preprocess_comment are done by code of the theme.
    But the times seem to work now!

    Just saw in another topic that you already have adressed the timezone-issue. Great! I’m gonna wait for the release of 2.0.9 and test it out then. But please remove that htmlentities() before releasing that version.

    Oh and fyi: I’m using Worpdress 3.0.1

    Hi John, the trick with the empty user_id did it. But with the 'comment_author' => htmlentities($fb_user[name]) the umlauts now are beeing displayed wrong in my blog because that silly function tries to convert the two bytes of the UTF-representation of the umlaut is made of in their html-entities. You can see that here: http://www.denniskoerner.de/blog/2010/08/29/testbeitrag/
    As my Blog is set to utf-8 encoding the utf-8-encoded umlauts do well.

    But I still have the problem with the time. All times importet fram facebook are UTC and are displayed as UTC-Time in my blog which is actual 2 hours earlier than local time. So it might happen, that I post something to my blog at 15:04 CEST und the facebook-comment is displayed as 13:05 because 15:05 CEST ist 13:05 UTC. To make it clear: If you have a look at my link above all comment-times are wrong. All of them have to be set to two hours later.

    Btw.: Thank you for that great plugin und for taking care that it runs in other languages/timzones than yours :o)

    If I comment the line apply_filters(bla bla bla) out it works but the time is in UTC instead of my blog time.

    OK, i’ve changed the wpbook_cron.php a bit so that I can see in the debug-file in which line it stops. It stops during execution of this line:
    $data = apply_filters('preprocess_comment', $data); // filtering normally done by wp_new_comment

    I looked in the documentation for the preprocess_comment-Filter and it says that it expect an array with a field user_ID which is missing in the program-code. http://codex.wordpress.org/Plugin_API/Filter_Reference

    $data = array(
                                    'comment_post_ID' => $wordpress_post_id,
                                    'comment_author' => $fb_user[name],
                                    'comment_author_email' => $wpbook_comment_email,
                                    'comment_author_url' => $fb_user[url],
                                    'comment_content' => $comment[text],
                                    'comment_type' => '',
                                    'comment_parent' => 0,
                                    'comment_author_IP' => '127.0.0.1',
                                    'comment_agent' => 'WPBook Comment Import',
                                    'comment_date' => $time,
                                    'comment_approved' => $wpbook_comment_approval
                                    );

    Any ideas?

    Hi John, I’m also unable to import comments. I’ve enabled teh debug-file. It seems it tries to import the comments and also correctly gets the info that the wall-post hast 5 comments attatched to it but then stops to import. It starts with the first comment and also gets the info that this comment is made by me (Dennis Körner) but then stops. Could it be that it has Problems with my name because of the ö in UTF-8?
    You can have a look at my facebook wall if you like to.

    Here is my logilfe hopefully wihtout secrets:
    2010-09-01 21:01:25 : Cron Running
    2010-09-01 21:01:25 : Facebook object: Facebook Object
    (
    [api_client] => FacebookRestClient Object
    (
    [secret] => **
    [session_key] => **
    [api_key] => **
    [friends_list] =>
    [user] => 100000901360357
    [added] =>
    [is_user] =>
    [canvas_user] =>
    [batch_mode] => 0
    [batch_queue:private] =>
    [pending_batch:private] =>
    [call_as_apikey:private] =>
    [use_curl_if_available:private] => 1
    [format:private] =>
    [using_session_secret:private] =>
    [rawData:private] =>
    [last_call_id] => 0
    [server_addr] => http://api.facebook.com/restserver.php
    [photo_server_addr] => http://api-photo.facebook.com/restserver.php
    [expires] => 0
    )

    [api_key] => **
    [secret] => **
    [generate_session_secret] =>
    [session_expires] =>
    [fb_params] => Array
    (
    )

    [user] =>
    [profile_user] =>
    [canvas_user] =>
    [base_domain:protected] =>
    )

    2010-09-01 21:01:25 : Getting posts, SQL was Select ID FROM wp_posts WHERE post_date BETWEEN ‘2010-08-25 21:01:25’ AND ‘2010-09-01 21:01:25’
    2010-09-01 21:01:25 : How many posts to consider? 8
    2010-09-01 21:01:25 : How many meta_posts found? 2
    2010-09-01 21:01:25 : Examining a meta_post, post ID is 2540, meta key = _wpbook_user_stream_id
    2010-09-01 21:01:25 : FBcomments, fbsql is SELECT time,text,fromid,xid,post_id FROM comment WHERE post_id=’100000901360357_144302882276423′ AND time > ‘0’ ORDER BY time ASC
    2010-09-01 21:01:25 : FBcommentslist is Array
    2010-09-01 21:01:25 : Number of comments for this post- 5
    2010-09-01 21:01:25 : Inside comment, comment[time] is 1283116161, comment[fromid] is 100000901360357
    2010-09-01 21:01:25 : Getting author info, fbsql is SELECT name,url FROM profile WHERE id = ‘100000901360357’
    2010-09-01 21:01:25 : fbuserinfo is an array, count is 1
    2010-09-01 21:01:25 : In fb_user, name is Dennis Körner, url is http://www.facebook.com/netzwerghh

Viewing 8 replies - 1 through 8 (of 8 total)