Infinite scrolling on newsfeed broken?

Moderator: admin

Infinite scrolling on newsfeed broken?

Postby Fegelein on Sat Jun 20, 2015 3:54 am

In the past, I remember the newsfeed scrolling many times before it stopped. In the past month or so, the newsfeed refuses to scroll for me, and only shows 10 entries. Is the infinite scroll broken?
User avatar
Fegelein
 
Posts: 3
Joined: Fri May 27, 2011 11:53 pm

Re: Infinite scrolling on newsfeed broken?

Postby longhairfish on Sun Jun 21, 2015 12:13 am

Hi Fegelein,

WOW! Your news feed is very busy :)

I checked your feed out. Pressing END on the keyboard brought me through at least 20 pages. It would still be going if I continued I think. It is showing 7 days of feeds.

News feeds has always been a bit of a worry. The best advice I would be able to give is to clear your browsers cookies. I recently just did that, so maybe this is why I can see all of your feeds.
User avatar
longhairfish
Site Admin
 
Posts: 4096
Joined: Sat Aug 09, 2008 9:31 am

Re: Infinite scrolling on newsfeed broken?

Postby Harmony Shagdoll on Mon Mar 21, 2016 9:52 pm

Whenever I try to use the news feed it ends up as an endless loop.
I can scroll 20 posts or so, then it starts all over with post ≈10-20 and repeats them in an endless loop as I scroll.
It doesn't matter which computer or cell ph I use, the behavior is still the same.
It's been like this for at least 2½ months.
Can someone tell me what's going on!?

B.R. H.S.
User avatar
Harmony Shagdoll
 
Posts: 8
Joined: Sat Oct 16, 2010 6:03 am

Re: Infinite scrolling on newsfeed broken?

Postby Joe2345 on Wed Jun 06, 2018 6:42 am

I have this same problem. No matter what device or browser, when I try to view my newsfeed, it shows, perhaps 20 or so items, then it begins to repeat them. That means that I can only view the most recent 20 or so events.

I have a few people of whom I am a fan who tend to post a LOT of galleries all at once at times. I don't want to hurt anyone's feelings by "un-fanning" them, but their large numbers of gallery posts tend to ruin my ability to see posts by other people of whom I am also a fan. Plus, there are times I do want to see all of the posts/galleries people have posted.

Is there some way to increase the dimension of the array (or whatever holds the indices to "events" that post to my newsfeed) so I can see, perhaps, the last 100 or even 200 events rather than being limited to only 20 or so? I know I'm missing out on some good stuff. :)

Perhaps (even more difficult for the programmers), we could receive one listing for each of the people of whom we're a fan, and then clicking on that person would open up all of their most recent "events". I know, I know. As a programmer (at times) myself, I understand that often a user request that sounds simple can turn out to be more difficult than one might imagine.

Still, this is something I'd love to see updated in some way so that I don't miss some important updates in my newsfeed just because one of the people I follow happens to post a bunch of galleries or comments, etc. I really like the newsfeed feature. It's a great way to keep up with what folks I follow have posted, or on comments I've received, etc. It's a very handy feature, indeed.

Thanks for all of the work you folks do!
User avatar
Joe2345
 
Posts: 11
Joined: Fri Apr 20, 2012 9:20 am

Re: Infinite scrolling on newsfeed broken?

Postby longhairfish on Thu Jun 07, 2018 9:58 am

Did you guys disabled all ad blocking options?
User avatar
longhairfish
Site Admin
 
Posts: 4096
Joined: Sat Aug 09, 2008 9:31 am

Re: Infinite scrolling on newsfeed broken?

Postby Joe2345 on Fri Jun 08, 2018 3:10 am

Yep. And this is the only site I visit for which I've ever had to do that. It's as if the array that holds the news feed pointers is just quite small.
User avatar
Joe2345
 
Posts: 11
Joined: Fri Apr 20, 2012 9:20 am

Re: Infinite scrolling on newsfeed broken?

Postby TimmThaler on Fri Mar 20, 2020 11:22 am

I had a look into the network inspector and can see there that the call to `/ajax/newsdata.php?userid=12345678&status=&galleries=&comments=&ts=1234567890`, that happens when I reach the bottom of the page, is done several times at once with the same timestamp-parameter. Sometimes just two times, sometimes up to seven times, seems just random how often. The effect is that the loaded galleries repeat that much often until I reach the end of the page again and new galleries with a new timestamp are loaded an random amount of times. And so on.

My workaround is: When I see a gallery repeat, I hit the end button on my keyboard and skip the repeated galleries. Using the end button instead of my mouse wheel seems to limit the repeated ajax calls to two.

Possible solution: Maybe the scroll listener that detects the end of the page gets triggered more than once, when the scroll command hits the bottom of the page again and again, until the new data is rendered. That would explain, why it is called just twice when I use the Keyboard and much more often, when I let my freewheeling mouse wheel spin. The solution would be to ensure only one ajax call is done at once by implementing a loading state that prevents other ajax calls. The code for that is:

Code: Select all
$(window).scroll(function()
{
    if($(document).height() - $(window).height() - $(window).scrollTop() < 100)
    {
        $('div#loadmoreajaxloader').show();
        $.ajax({
        url: "/ajax/newsdata.php?userid=1435453&status=&galleries=&comments=&ts=" + ts + "",
        success: function(html)
        {
            if(html)
            {
                $("#postswrapper").append(html);
                $('div#loadmoreajaxloader').hide();
            }else
            {
                $('div#loadmoreajaxloader').html('<center>No more posts to show.</center>');
            }
        }
        });
    }
});


Quick solution could be (untested): Change the
Code: Select all
if($(document).height() - $(window).height() - $(window).scrollTop() < 100)

to
Code: Select all
if($('div#loadmoreajaxloader').is(":hidden") && ($(document).height() - $(window).height() - $(window).scrollTop() < 100))


Faster (i.e. preventing race conditions on slow computers) would be to not use the DOM for that state but storing the state in a variable inside the scroll-function.

Please fix that stuff, as it drives me crazy when I use the newsfeed.
User avatar
TimmThaler
 
Posts: 2
Joined: Wed Sep 21, 2011 10:17 pm

Re: Infinite scrolling on newsfeed broken?

Postby TimmThaler on Thu Jan 26, 2023 8:34 am

Hey, thanks for fixing that eventually!
User avatar
TimmThaler
 
Posts: 2
Joined: Wed Sep 21, 2011 10:17 pm


Return to Site Stuff

Who is online

Users browsing this forum: aigent and 1 guest

cron