WordPress.org

Ready to get started?Download WordPress

Forums

Yet Another Related Posts Plugin (YARPP)
[resolved] [Plugin: Yet Another Related Posts Plugin] Random failures under 4.3.2 (4 posts)

  1. mjg@overthetop.com
    Member
    Posted 1 year ago #

    I've just recently upgraded a number of our sites running YARPP to WP4.3.2 and now am randomly getting the following error:

    WordPress database error: [Table 'expertm1_wrd13.wp_yarpp_related_cache' doesn't exist]
    SELECT SQL_CALC_FOUND_ROWS wp_posts.*, yarpp.score FROM wp_posts join wp_yarpp_related_cache as yarpp on wp_posts.ID = yarpp.ID WHERE 1=1 AND wp_posts.post_type IN ('post') AND (wp_posts.post_status = 'publish') ORDER BY yarpp.score DESC limit 5

    In this case, it appears to be happening when using iinclude() plugin to pull in the Page (not Post) content into the site's theme.

    Turning off the YARPP plug-in will immediately resolve the problem.

    Any thoughts?

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

  2. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 1 year ago #

    This is quite odd... YARPP should have tried to add that table if it does not exist. Perhaps the server user didn't have the permissions to run CREATE TABLE in MySQL? This is usually not the case in most server setups.

    You have two options: one is to manually create those tables (I can get you the definitions if necessary); the other is to not use tables for YARPP's cache. You can do this by adding define('YARPP_CACHE_TYPE', 'postmeta'); to your wp-config file.

  3. mjg@overthetop.com
    Member
    Posted 1 year ago #

    I'm not seeing anything that I would GUESS is a table for YARPP. I see tables that have been created by other plugins (Notably wp_popularpostdata and wp_popularpostdatacache) though.

    If you could shoot me the create table scripts in MySql, that would be great.

  4. mitcho (Michael Yoshitaka Erlewine)
    Member
    Plugin Author

    Posted 1 year ago #

    @mjg Here's the code:

    CREATE TABLE IF NOT EXISTS wp_yarpp_keyword_cache (
    ID bigint(20) unsigned NOT NULL default '0',
    body text NOT NULL,
    title text NOT NULL,
    date timestamp NOT NULL default CURRENT_TIMESTAMP,
    PRIMARY KEY (ID)
    );
    CREATE TABLE IF NOT EXISTS wp_yarpp_related_cache (
    reference_ID bigint(20) unsigned NOT NULL default '0',
    ID bigint(20) unsigned NOT NULL default '0',
    score float unsigned NOT NULL default '0',
    date timestamp NOT NULL default CURRENT_TIMESTAMP,
    PRIMARY KEY ( reference_ID , ID ),
    INDEX (score), INDEX (ID)
    );

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic