• Resolved Igor Yavych

    (@flyerua)


    From time to time, I see in error logs messages like

    WordPress database error Table ‘database_2.wp_comments’ doesn’t exist for query SELECT * FROM wp_comments WHERE comment_approved = ‘1’ AND comment_post_ID = 10807 ORDER BY comment_date_gmt ASC made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/themename/page.php’), comments_template, get_comments, WP_Comment_Query->query
    WordPress database error Table ‘database_2.wp_options’ doesn’t exist for query UPDATE wp_options SET option_value = ‘1’ WHERE option_name = ‘al2fb_importing’ made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/themename/page.php’), comments_template, apply_filters(‘comments_array’), call_user_func_array, WPAL2Facebook->Comments_array, update_optio

    the thing is, this is existing database, but it’s not wordpress’s database (let’s say WP db is named database_1). I have no clue for what reason it would want to query other database.
    /* UPDATE */
    Problem seems to lie within plugin called Add Link to Facebook, so I guess I have to ask it’s author

Viewing 3 replies - 1 through 3 (of 3 total)
  • Have you tried:

    – deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    – switching to the default theme to rule out any theme-specific problems.

    resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    Have you moved or cloned this site at any point?

    Thread Starter Igor Yavych

    (@flyerua)

    Hmm, so deactivating given plugin removed only one error message. Second is still there. Interesting thing, that this happens only on one page. For which comments are turned of on top of it.
    and it started to happen after 3.5 update I think

    Thread Starter Igor Yavych

    (@flyerua)

    Now that I think about it, that one page doesn’t use wpdb class to connect to db, and it connects to that “database_2”. But since it started happening only after 3.5 update, I assume some changes in wpdb caused it?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘WP tries to query wrong database’ is closed to new replies.