Support » Plugin: Yet Another Related Posts Plugin (YARPP) » [Plugin: Yet Another Related Posts Plugin] referenceId not used when geting posts from cache

  • Hi,
    YARPP seems to show the same related posts for all posts. When I look at the database it looks like the correct cache is generated but that the query to fetch the cache isn’t restricted to the current post id. Because of that the list just shows a list of all posts sorted by yarpp.score and this post usually includes both duplicates and the current post and it’s the same for all posts.

    This problem only seems to show up for posts translated with WPML – the original language doesn’t seem to be affected.

    I think this is the query being run:
    SELECT SQL_CALC_FOUND_ROWS posts.*, yarpp.score FROM posts JOIN icl_translations t ON posts.ID = t.element_id AND t.element_type IN ('post_post') JOIN icl_languages l ON t.language_code=l.code AND join yarpp_related_cache as yarpp on posts.ID = yarpp.ID WHERE 1=1 AND posts.post_type IN ('post') AND t.language_code='pl' ORDER BY yarpp.score DESC limit 5

    The version of YARPP is 3.5.1

    Example pages here:
    (Related posts are under the orange sidebar heading)

    If there is no quick fix, maybe there is a way to temporary disable or bypass the cache since we are using a page cache anyway.

Viewing 1 replies (of 1 total)
  • I don’t think bypassing the cache will help in this case… a loop kind of like this is always used by YARPP.

    It looks like this is a bad interaction between YARPP and WPML: WPML is removing the YARPP code which specifies the post ID in the query. I don’t have much experience with WPML, so I’d appreciate it if you reach out to the WPML authors.

Viewing 1 replies (of 1 total)
  • The topic ‘[Plugin: Yet Another Related Posts Plugin] referenceId not used when geting posts from cache’ is closed to new replies.