• Hey Steve,

    More error logs popping up when 2.1.30 publishes a post:

    [09-Apr-2013 20:01:12] 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/23765-angkor-bayon-01.jpg'
    				, 1
    				, ' '
    				,
    				, 1
    				, 80
    			) made by do_action_ref_array, call_user_func_array, check_and_publish_future_post, wp_publish_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
    
    (repeated many times, with different values for "Looking for")

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

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

    (@steveatty)

    There’s no post ID in the insert array which is very odd. and its working fine here.

    Do you have Relevanssi installed? I know its caused problems in the past because the developer of that plugin re-defines the global post object.

    I think I fixed it in one release by not using the post->ID object but its too late to look at the code tonight.

    Thread Starter JK

    (@justin_k)

    Yep

    Plugin Author Steve

    (@steveatty)

    OK – I edited the post after you replied…

    Its relevansi.. it buggers things up but the developer of it thinks its OK to load the global post object and change it (which is contrary to everything I’ve been told since I started coding back in 1981). Feel free to put the boot in:

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

    Its a matter of going through the code in Wordbooker and finding $post->ID and replacing it with $post_id (and making sure its in the global listing for each function its used it).

    Thread Starter JK

    (@justin_k)

    I see how what he’s doing could be an issue, but I can also see why he’s doing it – if Relevanssi needs shortcode to be evaluated to index the content, and shortcode evaluates based on the global post object, then I couldn’t think of a better way to do this either (?) – so the problem is probably that he’s not properly restoring it everywhere, rather than that he’s touching it at all.

    Along the same token, while I can’t disagree with your logic – that if Relevanssi were removed these errors would go away – the counterargument is also true – that with Relevanssi installed, I don’t get error_logs from anywhere else. So even though he probably shouldn’t be doing this, *if* it’s easy for Wordbooker’s logging to not to be affected by this, that would be nice too. Ultimately what matters is that they can be peacefully run together, one way or another 🙂

    (As a side note, one thing I’ve sort of always wanted was a way to disable Wordbooker’s logging entirely – rather than just hide it from the admin panel, as we did some time back. If it could be disabled then this and several other of the error_logs I’ve come up with in the past could be mitigated. I realize this is a larger thing to discuss, but still worth mentioning.)

    Plugin Author Steve

    (@steveatty)

    Are they only occurring the the “Looking for” messages?

    Thread Starter JK

    (@justin_k)

    So far, yeah.

    Plugin Author Steve

    (@steveatty)

    but $post->ID should never be trashed as it should be more reliable than anything else.

    You could try changing :

    if ($flag==1) {wordbooker_debugger(“Looking for “.$strip_domain.” in “.$single,” “,$post->ID,80) ;}

    to use the global post_id variable

    Thread Starter JK

    (@justin_k)

    Alright, done – will let you know how it goes once the next post goes out (probably 2 days)

    Plugin Author Steve

    (@steveatty)

    I guess what I need to do is go round and change all the $post->ID references to the global variable.

    Thread Starter JK

    (@justin_k)

    Just released a post and no error_log appeared, so it looks like changing it in just that one spot fixed it.

    Plugin Author Steve

    (@steveatty)

    Very odd – I wonder why its only that one bit that breaks. So changing it to use $post_id worked fine?

    Thread Starter JK

    (@justin_k)

    …Err, sorry, wait, I stand corrected. Previously I clicked “Publish” and no error_log appeared; today, I had a pre-scheduled post (which the original tests had been); there was no error_log prior to it going live, and there was after. The messages were the same “Looking for” messages – so apparently, it isn’t fixed after all :/

    Plugin Author Steve

    (@steveatty)

    OK I guess we’ll have to pass the post ID in from the calling process…. been watching movies and drinking beer for the past 5 hours so am not going to attempt it tonight,

    Thread Starter JK

    (@justin_k)

    Haha no worries…sounds like fun 🙂

    Plugin Author Steve

    (@steveatty)

Viewing 15 replies - 1 through 15 (of 20 total)

The topic ‘Error_log when posting with 2.1.30’ is closed to new replies.