Join our zoo community

New Posts

Discussion in 'ZooChat Community & Website' started by birdsandbats, 25 Apr 2019.

  1. birdsandbats

    birdsandbats Well-Known Member 5+ year member

    Joined:
    17 Sep 2017
    Posts:
    11,437
    Location:
    Wisconsin
    Is anyone else seeing weird things with the "New Posts" bar on the side? It keeps switching between one, two, three, or four posts showing instead of the usual five. @Simon Hampel are you switching things around there? Or is something else going on?
     
    Last edited: 25 Apr 2019
    ZooBinh and Jambo like this.
  2. Jambo

    Jambo Well-Known Member 5+ year member

    Joined:
    30 Jul 2018
    Posts:
    6,834
    Location:
    Somewhere near a zoo
    I was noticing this too, but now it appears that from no new posts, there are 3!o_O
     
  3. birdsandbats

    birdsandbats Well-Known Member 5+ year member

    Joined:
    17 Sep 2017
    Posts:
    11,437
    Location:
    Wisconsin
    Five is back now.
     
    Jambo likes this.
  4. Simon Hampel

    Simon Hampel Administrator Staff Member 20+ year member

    Joined:
    18 Oct 2003
    Posts:
    4,035
    Location:
    Sydney, Australia
    It's probably a quirk in the way the system works.

    Without having recently looked at the code - I'm pretty sure it does a query on the database to find the most recent 10 or 20 posts and saves that information to the cache for a period so it doesn't have to keep doing new queries for every page view.

    However, because the system doesn't know who is viewing the new posts - it finds new posts for all members, including moderators and administrators - and some of those threads are not visible to regular members.

    Of course, before displaying the posts to a specific user, it will filter the list to only show those threads visible to that user - we don't want moderator threads showing to regular users.

    Now, this morning (or this evening for some of you), the moderators had a whole bunch of threads being discussed in the moderator area (a lot more than usual) - so I'm guessing what's happened is that the list of new threads was dominated by moderator threads which you can't see - so you only get a couple of new posts showing up until enough regular threads get new content to push all the moderator threads far enough down the list.

    So, if the system gets the 10 latest new threads (with the intention of displaying 5 of them) - but 7 of them are moderator threads - you'll only see 3 threads in the New Posts box.

    At least I think that's what's happening.
     
    ZooBinh and birdsandbats like this.
  5. birdsandbats

    birdsandbats Well-Known Member 5+ year member

    Joined:
    17 Sep 2017
    Posts:
    11,437
    Location:
    Wisconsin
    Thanks! I've seen this before and wondered what happened, but I started this thread when I noticed it only displayed one thread.