WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] [Plugin: Wordbooker] DB error during 404 responses (6 posts)

  1. theresa95
    Member
    Posted 3 years ago #

    Wordbooker version 19debug

    When a 404 response occurs, following is also logged in error logs:

    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 '' at line 1 for query select facebook_id from wp_wordbook_userdata where user_ID= made by require, require_once, include, get_header, locate_template, load_template, require_once, wp_head, do_action, call_user_func_array, wordbooker_header, wordbooker_get_cache

    # Wordbooker: 1.8.4
    # Wordbooker Schema: 7
    # WordPress: 2.9.2
    # PHP: 5.3.2
    # JSON Encode: PHP
    # JSON Decode: PHP
    # JSON Version: 1.2.1
    # SimpleXML library: PHP
    # HTTP Output Character Encoding: No Multibyte support
    # Internal PHP Character Encoding: No Multibyte support
    # MySQL: 5.0.90
    # Database character_set_client : utf8
    # Database character_set_connection : utf8
    # Database character_set_database : utf8
    # Database character_set_filesystem : binary
    # Database character_set_results : utf8
    # Database character_set_server : utf8
    # Database character_set_system : utf8
    # Database character_sets_dir : /usr/share/mysql/charsets/
    # Database collation_connection : utf8_general_ci
    # Database collation_database : utf8_unicode_ci
    # Database collation_server : utf8_unicode_ci
    # Server : Apache
    # Active Plugins :
    WP-UserOnline ( 2.73 )

  2. Steve
    Member
    Posted 3 years ago #

    A 404 error where and how?

    Can you explain the steps you take to get to this error. The problem would seem to be that the query is losing the user_id which is very odd because it should always be called with a user_id

    Can you turn on the advanced diagnostics and then force a status refresh from the options page?

  3. theresa95
    Member
    Posted 3 years ago #

    Sorry, I was not clear.

    The Wordbooker seems to be working just fine. WP posts are posted to FB and FB status is displayed on WP both in a widget and in Options.

    What happens is, if I request a non existing page, say http://domain.com/index.php/2010/06/this-article-does-not-exist/, I receive the usual 404 response in the user agent, however, Apache also logs the above mentioned error.

    I assumed this is related to Wordbooker due to wording of the error message and also when I disable Wordbooker no such error is logged.

    Below is the output from advanced disgnostics. Thanks for your help and time.

    2010-06-14 21:24:03	Cache Refresh Commence  	( )
    2010-06-14 21:24:03	Cache processing for user : 	( UserID )
    2010-06-14 21:24:03 Getting Permisions for : 	( UserID )
    2010-06-14 21:24:05 Additional Permissions needed : 	( 0 )
    2010-06-14 21:24:05 Getting Status for : 	( UserID )
    2010-06-14 21:24:06 Failed to get page information from FB 	( )
    2010-06-14 21:24:06 Setting name as : 	( Name Surname )
    2010-06-14 21:24:06 Setting status as : 	( First few sentences of FB status...
    2010-06-14 21:24:06 Setting URL as : 	( http://www.facebook.com/profile.php?id=UserID )
    2010-06-14 21:24:06 Cache Refresh Complete 	( )
  4. Steve
    Member
    Posted 3 years ago #

    You're right - that is very odd.

    For some reason it looks like the 404 forces something to kick the cache and because there is no page there is no associated user_id,

    Now I know how to reproduce it I can work on a fix.

  5. Steve
    Member
    Posted 3 years ago #

    Found it..

    You can fix it very easily:

    open wordbooker.php

    find the line ;

    function wordbooker_header($blah){

    and add on the next line:

    if (is_404()) {return;}

  6. theresa95
    Member
    Posted 3 years ago #

    Yes, the error message is gone. Many thanks.

Topic Closed

This topic has been closed to new replies.

About this Topic