WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[Plugin: Yet Another Related Posts Plugin] SQL error in log after update to latest version YARRP (7 posts)

  1. technabob
    Member
    Posted 2 years ago #

    After I upgraded to the latest version of your plugin, I started seeing the following error in my logs - it seems to happen sporadically upon saving posts in the admin...

    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 order by score desc limit 12) union (SELECT 28069 as reference_ID, ID, ROUN' at line 5 for query insert into wp_yarpp_related_cache (reference_ID,ID,score) (SELECT 28069 as reference_ID, ID, ROUND(0,1) as score
    from wp_posts
    where post_status in ( 'publish', 'static' ) and ID != '28069' and post_password ='' and post_type = 'post'
    group by ID
    having score >= 1.00 and >= 1 order by score desc limit 12) union (SELECT 28069 as reference_ID, ID, ROUND(0,1) as score
    from wp_posts
    where post_status in ( 'publish', 'static' ) and ID != '28069' and post_password ='' and post_type = 'page'
    group by ID
    having score >= 1.00 and >= 1 order by score desc limit 12) on duplicate key update date = now() made by require, require_once, include, related_posts, yarpp_related, YARPP->display_related, YARPP_Cache->enforce, YARPP_Cache_Tables->update

    http://wordpress.org/extend/plugins/yet-another-related-posts-plugin/

  2. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 2 years ago #

    Thank you so much for bringing this to my attention! This was a bug in 3.4.x that would happen when you required that a certain number of categories or tags were in common, but that post doesn't have any categories or tags.

    I just released 3.4.4b2 which I believe addresses this issue. After installing 3.4.4b2, please go to the YARPP options and make sure the "relatedness" criteria is the same as before. There was a slight migration in the internal options values, and I want to make sure that your settings are copied over correctly. Thanks!

    http://downloads.wordpress.org/plugin/yet-another-related-posts-plugin.3.4.4b2.zip

  3. technabob
    Member
    Posted 2 years ago #

    Cool. Thanks for the reply - I'll definitely install the update and let you know if the problem goes away.

  4. technabob
    Member
    Posted 2 years ago #

    So maybe I'm looking in the wrong place, but I don't see the relatedness criteria anywhere in the options screen. I see "Order results" but that's it. I didn't see them under the last version either, but I know I saw them several versions back.

    I'm using a custom template file for both the website and rss feed if that helps.

  5. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 2 years ago #

    @technabob they were hidden starting in version 3.3 to simplify the options. If you go to "screen options" at the top of the screen, you can make them visible again.

  6. technabob
    Member
    Posted 2 years ago #

    Got it. Thanks. I'm actually not sure if I lost any of my settings, as I don't recall how I had them set. I thought I had it considering both tags and titles before, but I only see that it's using tags now. I just added title to the criteria and that's the way I want it anyhow.

    The good news is that the errors are now gone from the logs.

    Thanks again for your help - and a great plugin.

  7. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 2 years ago #

    @technabob you mean it went to not considering title or content at all? That may indicate a bug on my part... I'll look into it.

    Thanks for getting back to me to report that the original bug is gone!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic