WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
WordPress database error Table (17 posts)

  1. Watch Teller
    Member
    Posted 9 months ago #

    Hi Yoast,

    My server's error log shown as below once I activated WooCommerce Follow Up Email (trouble shooting - followup_cutomer_id, order _id & price database table repeat 8 times):

    [12-Jul-2013 17:40:50 UTC] WordPress database error Table 'xxxxxxxxx.wp_users' doesn't exist for query SELECT COUNT(*) FROM wp_users INNER JOIN wp_usermeta ON (wp_users.ID = wp_usermeta.user_id) WHERE 1 = 1 AND ( wp_usermeta.meta_key = 'wp_1_capabilities' ) made by do_action_ref_array, call_user_func_array, Yoast_Tracking->tracking

    Need help and assist

    Thanks

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. jrf
    Member
    Posted 9 months ago #

    Oh dear, that is a bit silly indeed. Thank you for reporting this!
    I have submitted a pull request which will fix this, so it should hopefully be sorted in the next release.

    To get rid of the error for now, please uncheck the checkbox enabling tracking in SEO -> Dashboard.

    Once the next version has been released, you can check it again if you like.

    Hope this helps.

    Smile,
    Juliette

  3. Watch Teller
    Member
    Posted 9 months ago #

    Thanks and fast response.

  4. jrf
    Member
    Posted 9 months ago #

    You're welcome ;-)

  5. Watch Teller
    Member
    Posted 9 months ago #

    Hi jrf,

    Update
    After uncheck the checkbox enabling tracking that my server error log still have error shown as below:

    "[14-Jul-2013 17:34:59 UTC] WordPress database error Table 'xxxxx.xxx.wp_users' doesn't exist for query SELECT COUNT(*) FROM wp_users INNER JOIN wp_usermeta ON (wp_users.ID = wp_usermeta.user_id) WHERE 1 = 1 AND ( wp_usermeta.meta_key = 'wp_1_capabilities' ) made by do_action_ref_array, call_user_func_array, Yoast_Tracking->tracking"

  6. jrf
    Member
    Posted 9 months ago #

    @Watch Teller Strange... as the code is only being called upon by tracking and shouldn't even be included if tracking is disabled. Hmm.. will have a look, but that's another issue altogether.

    For now, let's just bite our time till the next release which should fix the issue. In the mean, if you like, you can change the line I changed in the pull request in your install. That should definitely get rid of the error.

    @ebuzztoday glad to hear it's gone, but a server reboot should not be able to fix this. Or are you not using database table prefixes ?

  7. mikeotgaar
    Member
    Posted 5 months ago #

    @jrf @yoast
    FYI
    Seeing this issue again (latest WordPress plugin version, WP 3.6.1) Tracking is not enabled - still shows log error

    May not be directly caused by WordPress SEO. There's a related bug report for Google Analytics for WordPress (http://wordpress.org/support/topic/wordpress-database-error-when-using-prefix-other-than-wp_?replies=4) for the same error

    Going to do the change suggested in that thread and keep an eye on error logs for a few days.

  8. jrf
    Member
    Posted 5 months ago #

    @mikeotgaar

    Can you check whether this is really the same error and what version of WPSEO you are on.

    The latest version (1.4.18) does include the fix I send in a while ago and should not give this error.

    FYI: the change suggested in the other thread is basically the same as the one already applied, though my actual fix complies with the WP standards of using wpdb->prepare() while the other fix does not and should give error notices (deprecated warnings).

  9. mikeotgaar
    Member
    Posted 5 months ago #

    @jrf
    Thanks for prompt response -
    WordPress SEO plugin version is 1.4.18
    Also confirm the fix is in the file as per the change.

    I'm sure this is the GA plugin not WordPress SEO

    GA has an anonymous tracking setting - (uses php script very similar to the OLD code you fixed) in /google-analytics-for-wordpress/incl/class-tracking.php on line 113 (Version 4.3.3)

    'users' => $wpdb->get_var( "SELECT COUNT(*) FROM wp_users INNER JOIN wp_usermeta ON (wp_users.ID = wp_usermeta.user_id) WHERE 1 = 1 AND ( wp_usermeta.meta_key = 'wp_{$blog_id}_capabilities' ) " ),

    I've got both plugins on several sites - been through all the error logs today - only the one with the GA tracking function enabled produced the error which narrows things down.

    Think I got confused from the reference to call_user_func_array, Yoast_Tracking in the log - didn't notice GA is also Yoasts and uses the same class Yoast_Tracking function

    Looks like Yoast's GA plugin hasn't had that updated yet - submit the fix and put a (another) feather in your cap :)

    So not this plugin, and not a conflict - my mistake for reporting here

  10. jrf
    Member
    Posted 5 months ago #

    Checked and you are right, the issue is with the GA plugin.
    Pull request send. No idea if and when it'll be applied and/or a new versions will be available.

    If you want to patch your current install, you can pull the code from my pull request/git fork.

  11. mikeotgaar
    Member
    Posted 5 months ago #

    Neat...
    See there's quite a few changes - Done both files. Didn't break anything so all is good.
    Kudos and many thanks

  12. jrf
    Member
    Posted 5 months ago #

    You're welcome ;-)
    And the rest of the changes where just best practices applied.

  13. darkpollo
    Member
    Posted 2 months ago #

    Hi, Any ideas on how to fix this manually?

    Thanks

  14. jrf
    Member
    Posted 2 months ago #

    @darkpollo: as said in previous replies: if you want to patch your current install, look at the pull request and copy the changes to your own version.

    Still, this issue is quite old, so you'd be far better off upgrading to the latest versions as those should have the patches included already.

  15. darkpollo
    Member
    Posted 2 months ago #

    Hi,
    Sorry i missed that part of the message.
    I have just install the plugin so it seems it is not fixed on the latest version.

    I will try to fix it. I hope i wont break anything.

    Thanks

  16. jrf
    Member
    Posted 2 months ago #

    @darkpollo: it most definitely is fixed in the latest WP SEO, but you may be using other related plugins in which it is not fixed yet.

  17. darkpollo
    Member
    Posted 2 months ago #

    You are right, is on the Google Analytics plugin from Yoast.
    I am not sure why he fixed one and not the other.

    Anyway, I will wait for an official fix.

    Thank you!

Reply

You must log in to post.

About this Plugin

About this Topic