• Client called to our attention that related posts seem to be… weird. The example they used was for the Broad Headed Skink (posts at bottom):
    https://encyclopediaofalabama.org/article/broad-headed-skink/

    Indeed, these posts seem to have nothing to do with the article:
    https://imgur.com/qpuRAhO

    When I outputted their scores on the page they look like this:
    https://imgur.com/CUh2OE2

    Now HERE’S THE WEIRD PART. I pulled the site down to my local to try to troubleshoot the issue. When I first pulled it down it looked just like live with the odd related posts. But then I cleared the cache and everything seemed to work properly:

    https://imgur.com/FN4ZBXW
    https://imgur.com/8BOhcNm

    However when I clear the cache on production, nothing changes. Why would two different sites that have the same database show different results? The only thing I can think of is that maybe the cache is failing to clear? What else could cause this?

    For what it’s worth, I’m hosted on WPEngine.

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author YARPP

    (@jeffparker)

    Hi @martinparets

    • WPEngine typically caches quite aggressively. Have you cleared all WPEngine caches for the website?
    • The other thing you can check is whether the YARPP Cache MySQL table empties when you clear the cache.
    • How are you including YARPP on the page? I do not see our usual containing CSS classes / divs. Have you modified the plugin?
    Thread Starter martinparets

    (@martinparets)

    Hello,

    1. I have cleared all WPEngine caches.
    2. I was hopeful but checked and the YARPP cache table is indeed empty.
    3. We’re using the yarpp_get_related function. To output the scores (which is giving me the aforementioned different results on both local and production) I used this code:

      $related = yarpp_get_related(array(
        'post_type' => array('article'),
        'show_pass_post' => false, 
        'show_sticky_posts' => false,
        'past_only' => false,
        'exclude' => array(),
        'recent' => false,
        'weight' => array(
          'body' => 1,
          'title' => 0, 
          'tax' => array(
            'category' => 2,
          )
        ),
        'require_tax' => array(),
        'threshold' => 3,
        'template' => 'list', 
        'limit' => 4,
        'order' => 'score DESC', 
        'promote_yarpp' => false,
        'generate_missing_thumbnails' => false,
        'extra_css_class' => '',
        ),
      );

    What a weird issue. Looks like it doesn’t have anything to do with caching.

    • This reply was modified 1 year, 5 months ago by martinparets.
    Thread Starter martinparets

    (@martinparets)

    I’m guessing there’s no helping me here, but am going to bump this thread anyway because I’m getting rather desperate as YARPP is the only plugin that can possibly meet our needs.

    Is there ANYTHING I can do to further troubleshoot this? I’ve tried uninstalling & re-installing, clearing caches, different display methods – but no matter what the WPEngine site is giving me bad relevance scores. Local copy of the site still works great.

    Thread Starter martinparets

    (@martinparets)

    Edit: Ignore this comment, what I posted here turned out to not be true.

    • This reply was modified 1 year, 1 month ago by martinparets.
    • This reply was modified 1 year, 1 month ago by martinparets.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Related posts different between local / production’ is closed to new replies.