• mfurner

    (@mfurner)


    Gday

    One of the sites I look after has a peculiar issue with YARPP which I can’t quite pinpoint. No related posts are showing the majority of the time, although changing any YARPP options will briefly make them appear again.

    My suspicions are on W3TC, which is also installed on the site. Perhaps there is a conflict with YARPP’s cache and W3TC? Regardless, any insight into the cause of the problem and a fix would be greatly appreciated.

    It’s running YARPP 3.5.5, and if it helps the caches enabled in W3TC are the page cache and object cache.

    Cheers

    https://www.ads-software.com/extend/plugins/yet-another-related-posts-plugin/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Sorry to hear you’re having trouble getting things to work. I would, for starters, suggest you try lowering your “match threshold” in YARPP. This is in the “Relatedness” settings, which, if hidden, you can get to through the screen options tab.

    Thread Starter mfurner

    (@mfurner)

    Thanks for the reply mitcho,

    I’ve tried reducing the match threshold however this doesn’t seem to be the issue. I can change any YARPP option and the related posts will briefly display, however it doesn’t take too long for them to disappear again.

    Scratching my head to what it could be, I think the related posts may be disappearing when any post or page is updated or a new one posted, but not sure.

    Okay, your description isn’t something I’ve heard of before, and I’d really like to sort it out. It may be a plugin interaction… what other plugins are you running, besides W3TC? Do you know if this issue disappears if you (temporarily) turn off W3TC, or perhaps just turn off W3TC’s object cache?

    Thread Starter mfurner

    (@mfurner)

    I’ve just tried both turning off W3TC completely and just turning off the object cache and neither have provided any success, so this is probably an indication that W3TC isn’t the cause of the problem.

    There’s quite a few plugins enabled on the site, and not including a little in-house one these are:

    • Akismet
    • All in One SEO Pack
    • BuySellAds
    • Categories to Tags Converter Importer
    • Disqus Comment System
    • FeedBurner FeedSmith
    • Get Recent Comments
    • Gigs Calendar
    • Google Custom Search Plugin
    • Google XML Sitemaps
    • Gravity Forms
    • Gravity Forms Campaign Monitor Add-On
    • Hotfix
    • MediaRSS with Post Thumbnail
    • Popularity Contest
    • Redirection
    • RSS Footer
    • Shadowbox JS
    • Subscribe To Comments
    • User Photo
    • VaultPress
    • W3 Total Cache
    • WordPress.com Stats
    • WordPress Gallery Slideshow
    • WordPress Google Form
    • Worpress Video
    • WP-PageNavi
    • WP-Polls
    • WPtouch Pro
    • Yet Another Related Posts Plugin

    Also, just so you know, I’ve updated YARPP to 3.4.6.

    Thread Starter mfurner

    (@mfurner)

    Hey mitcho,

    Just wondering if given the information there you’ve any insight into what the problem may be.

    Cheers

    @mfurner that’s a lot of plugins. ?? Nothing comes up as a red flag…

    So, when you edit posts, there’s a “related posts” metabox there in the edit screen (possibly hidden; show in the screen options). If you look at one of these posts which doesn’t give you results from the edit screen, does it have results there?

    Also, are you displaying using the YARPP widget, “automatic display”, or calling a yarpp function in your theme?

    Thread Starter mfurner

    (@mfurner)

    Thanks for the reply mitcho,

    I hadn’t looked at the related posts metabox and it appears that related posts were being shown there when they weren’t appearing on the site. I think I may have found the issue however.

    The theme was using the following code to include the related posts:

    <?php if (function_exists('related_posts_exist')) {
    		if (related_posts_exist()) { related_posts(); }
    	} ?>

    on the single.php template.

    Changing this to:

    <?php if (function_exists('related_posts_exist')) {
    		if (related_posts_exist(array(),null)) { related_posts(); }
    	} ?>

    Has made the posts appear. I think this has something to do with lines 618 and 634 of class-core.php in YARPP.

    @mfurner thank you for your detective work! I see the issue here… it seems that I’d fixed this (checking for null and false values, not just null) for the display_related method but not for others. Please see if this beta fixes your issue. It *should* work with just calling related_posts_exist():

    https://downloads.www.ads-software.com/plugin/yet-another-related-posts-plugin.3.6b6.zip

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Related posts disappearing – cache issue?’ is closed to new replies.