WordPress.org

Support

Support » Plugins and Hacks » Wordbooker » PHP Warnings

PHP Warnings

  • Two unique PHP warnings that are appearing from Wordbooker 2.1.25:

    [07-Jan-2013 09:11:44] WordPress database error Unknown column ‘fb_user_id’ in ‘field list’ for query INSERT INTO wp_wordbooker_postcomments (fb_post_id,comment_timestamp,wp_post_id,blog_id,user_id,fb_user_id,fb_target_id) VALUES (“3309143_10101343207408414”,1357549904,22703,1,1,3309143,3309143) made by edit_post, wp_update_post, wp_insert_post, wp_transition_post_status, do_action(‘transition_post_status’), call_user_func_array, wordbooker_process_post_data, wordbooker_publish, wordbooker_publish_action, wordbooker_fbclient_publishaction, wordbooker_wall_post, wordbooker_store_post_result

    and

    [09-Jan-2013 02:00:26] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ 1
    , 80
    )’ at line 15 for query INSERT INTO wp_wordbooker_errorlogs (
    user_id
    , method
    , error_code
    , error_msg
    , post_id
    , blog_id
    , diag_level
    ) VALUES (
    1
    , ‘Looking for addthis.com in http://media.justin-klein.com/post-images/2013/23410-sim-cards.jpg
    , 1
    , ‘ ‘
    ,
    , 1
    , 80
    ) made by do_action_ref_array, call_user_func_array, check_and_publish_future_post, wp_publish_post, wp_update_post, wp_insert_post, wp_transition_post_status, do_action(‘transition_post_status’), call_user_func_array, wordbooker_process_post_data, wordbooker_publish, wordbooker_publish_action, wordbooker_fbclient_publishaction, wordbooker_return_images, wordbooker_strip_images, wordbooker_debugger

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

Viewing 15 replies - 1 through 15 (of 26 total)
  • Plugin Author Steve

    @steveatty

    Your Database structure has got out of sync with the code. somehow.

    What schema version is Wordbooker saying its using?

    Did you just upgrade and if so from what version?

    I did just upgrade, first time in about a year. 2.0.9->2.1.25. Admin panel says schema = 5.6.

    Plugin Author Steve

    @steveatty

    And the second bit of code is because there is no POST_ID for the insert… which should not be happening…

    Plugin Author Steve

    @steveatty

    OK so did you go to the Options screen after updating but before running a post?

    Yep. Deactivated, deleted old plugin, uploaded new plugin, activated, visited Wordbooker’s settings page, looked around & changed a thing or two, then posted.

    Plugin Author Steve

    @steveatty

    Very odd – One fix would be to delete the wordbooker_postcomments table and then de-activate and re-activate the plugin but that will lose any data in there.

    I’m off to bed now but will try to work out why the DB upgrade seems to have failed as the table is obviously missing columns when it shouldn’t be.

    Also not sure why the post_id is missing because it shouldn’t be – unless something is screwing up the POST object.

    Easier: I just went ahead and manually changed the structure in phpMyAdmin to match wordbooker.php line 274. There were quite a few problems, I suspect the table-update code might need a look. Specifically:

    fb_post_id was wrong (length 40 instead of 240)
    fb_comment_id was wrong (length 40 instead of 240)
    key timestamp was missing
    FB_USER_ID was missing
    FB_TARGET_ID was missing

    …And yet more schema issues:

    [11-Jan-2013 06:12:30] WordPress database error You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘ 1
    , 80
    )’ at line 15 for query INSERT INTO wp_wordbooker_errorlogs (
    user_id
    , method
    , error_code
    , error_msg
    , post_id
    , blog_id
    , diag_level
    ) VALUES (
    1
    , ‘Looking for addthis.com in http://media.justin-klein.com/post-images/2013/22315-angkor-wat-03.jpg
    , 1
    , ‘ ‘
    ,
    , 1
    , 80
    ) made by do_action_ref_array, call_user_func_array, check_and_publish_future_post, wp_publish_post, wp_update_post, wp_insert_post, wp_transition_post_status, do_action(‘transition_post_status’), call_user_func_array, wordbooker_process_post_data, wordbooker_publish, wordbooker_publish_action, wordbooker_fbclient_publishaction, wordbooker_return_images, wordbooker_strip_images, wordbooker_debugger

    Plugin Author Steve

    @steveatty

    … its the same second error as the last time.. For some reason your installation is losing the $POST object .. if you look there is a missing value in that insert… the value that is missing is the postid which I get from the $post object… thus that would suggest that the global $post object has been destroyed. There is a plugin that I know messes with the $post object.

    Can you provide your support information and tell me exactly when this is happening.

    Plugin Author Steve

    @steveatty

    The table structure issues are odd… I did have a great bit of code that did a schema compare and adjusted things but on some mis-configured MySQL installs it hung.

    Plugin Author Steve

    @steveatty

    I know wjy tne schema went wrong..

    You deactivated the plugjn with an old schema structure. When you reactivated it it ran the create table script which of course silently failed as the objects were already thrre but then it set the schema version to the latest version. This meant that the update schema code didn’t run leavingyou with tthe mess you did.

    >>I know wjy tne schema went wrong..

    …Isn’t that the point though? To deactivate an older version, activate a new version? 😛

    >>tell me exactly when this is happening.

    I believe it happens after a post is published.

    >>Can you provide your support information

    Messaged privately to the Wordbooker Facebook profile

    Plugin Author Steve

    @steveatty

    The need to deactivate between releases was removed at version 2.0 as documented in the user manual – Version 2.0 has, like most other WordPress plugins, no need to be de-activated for upgrading.

    As for the Post object… I knew I’d seen this before:

    http://wordpress.org/support/topic/redefining-the-global-post-object?replies=10

    I’m trying to work out if the bug still remains in their code.

    Plugin Author Steve

    @steveatty

    IT still looks like revelanssi breaks things.

    Can you upgrade to the latest version of that plugin then…

    open the indexing.php file (in the lib directory).

    and find in the relevanssi_index_doc function

    if (is_array($post)) {
    	$post = get_post($post['ID']);
    }

    and comment out that $post=

    line

    Plugin Author Steve

    @steveatty

    In fact – can you turn that plugin off totally and see if the problem goes away.. the more I look at the code in it the more it scares me.

    OR there might be a fix..

    find the same function as I mentioned before and remove the comment I told you put in.

    Then at the top of the function you’ll see:

    global $wpdb, $post, $relevanssi_variables;

    edit this to:

    global $wpdb, $relevanssi_variables;

Viewing 15 replies - 1 through 15 (of 26 total)
  • The topic ‘PHP Warnings’ is closed to new replies.
Skip to toolbar