• Resolved A.T.

    (@annaryker)


    I can’t post a link since I have installed this plugin on a local wp install.

    I’m using the plugin to cycle through random posts with a specific tag and category. There are 2 post categories and 7 tags. This is my url:
    mydomain.com/?redirect_to=random&cat=47&tag_id=56&each_once=rewind

    For now each tag has 10 posts in it (will be 150 on final version). So it should cycle through those 10 posts randomly until it’s gone through them all.
    For some reason it always jumps to the second to last post, then to a random post, then back to the homepage.
    It does this for all the tags. This doesn’t always happen. About 50% of the time the plugin works, the other 50% it doesn’t.

    All the posts are published, there is no caching plugin.

    When I add &rutpdebug=2 to the end of the url, I get this:

    Picking each random post only once.
    We use redirect_to=random.
    Query parameters:
    
    array(9) {
      ["cat"]=>
      string(2) "47"
      ["fields"]=>
      string(3) "ids"
      ["ignore_sticky_posts"]=>
      bool(true)
      ["order"]=>
      string(4) "DESC"
      ["post_status"]=>
      string(7) "publish"
      ["post_type"]=>
      string(4) "post"
      ["posts_per_page"]=>
      int(-1)
      ["suppress_filters"]=>
      bool(true)
      ["tag_id"]=>
      string(2) "56"
    }
    We found 10 matching post(s) in the cache.
    We picked a random post.

    So, it ‘sees’ all the posts, it just doesn’t cycle through them.

    For some reason, after I add &rutpdebug=2 to the url, reload the page, and delete &rutpdebug=2 again, everything works fine for a while.

    Any suggestions?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Christoph

    (@camthor)

    Do you use any other (i.e. external) service with caching, like Cloudflare? Does it make a difference if you add anything like &anyrandomstring=1 with new numbers for each call?

    The information that you get with &rutpdebug=2 looks good to me.

    Thread Starter A.T.

    (@annaryker)

    I’m not using any caching service currently.
    I’m not entirely sure I understand what you mean by “with new numbers for each call”.
    I’ve added &anyrandomstring=1 to the end of each url and it didn’t change much. Some posts get skipped, sometimes it shows the same post twice in a row, sometimes the links work as intended.

    I’ve also tried disabling all the other plugins, but the issue persists.

    • This reply was modified 3 years, 2 months ago by A.T..
    Plugin Author Christoph

    (@camthor)

    So with &anyrandomstring=1, &anyrandomstring=2, &anyrandomstring=3 and so on added to your URL it still jumps to the second to last post, then to a random post, then back to the homepage? And every time “&rutpdebug=2” shows that it finds 10 posts?

    Can you try with another browser?

    If you check the cookies in the browser, there should be one called “chatty_mango_rutp_done”. When you keep using your link, this cookie value should increase, with numbers separated by dashes, like “26-1465-237”.

    It could have to do with the fact that you use a local installation.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Plugin works sometimes, not always’ is closed to new replies.