[buddypress-trac] [BuddyPress] #2000: again showing double-post in activity-stream

buddypress-trac at lists.automattic.com buddypress-trac at lists.automattic.com
Fri Feb 26 00:01:15 UTC 2010


#2000: again showing double-post in activity-stream
------------------------+---------------------------------------------------
Reporter:  erich73      |       Owner:       
    Type:  defect       |      Status:  new  
Priority:  major        |   Milestone:  1.2.2
Keywords:  needs-patch  |  
------------------------+---------------------------------------------------
Changes (by cnorris23):

  * keywords:  => needs-patch


Comment:

 Good catch. I tested this on testbp.org, and was able to reproduce it.
 Here's what appears to be happening. When you visit a page with an
 activity stream, the most recent 20 activities and their comments are
 retrieved. If a new post is added to the activity stream before you click
 "load more," you will get a duplicate post after clicking "load more."
 Here's what's going on. Say there are 40 posts in the stream:
 {{{
 Newest Activity (post-id-40)
 ...
 Oldest Activity (post-id-21)
 Load More
 }}}
 When you click load more, you expect to see the second page of activity,
 post-id-20 through post-id-1. Let's say two new posts have been added to
 the stream before you click load more, for a total of 42 posts. Instead of
 seeing post-id-20 through post-id-1 after clicking load more, you get
 this:
 {{{
 post-id-22
 ...
 post-id-3
 Load More
 }}}
 Your full stream will now show:
 {{{
 post-id-40
 ...
 post-id-21
 post-id-22
 post-id-21
 ...
 post-id-3
 Load More
 }}}
 I haven't looked at the code to see what, exactly, is happening, but it
 looks the offending function only iterates through stream posts in blocks
 of 20, without regard for the the last post shown.

-- 
Ticket URL: <https://trac.buddypress.org/ticket/2000#comment:2>
BuddyPress <http://buddypress.org/>
BuddyPress


More information about the buddypress-trac mailing list