I am running drupal 8 site and have view with infinite scroll that appears only on mobile screen.
Sometimes module duplicates last atricle from view when Automatically Load Content is set.
To clarify: I have a view with infinite scroll that display 6 atricles. When user reach the end of that view, new six articles should be loaded. Instead of that, sometimes, module load 5 new atricles with first one being same as last atricle from old atricles.
I'll attach image to explain you better.

CommentFileSizeAuthor
#6 query_setting.png59.72 KBvakulrai
sl1.png291.73 KBstefxq
sl2.png321.35 KBstefxq
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

stefxq created an issue. See original summary.

nickrhymes’s picture

We are also seeing this issue - we show X records on a page and when clicking to view more we sometimes get the last record of the previous set duplicated as the first record of the new set.

We aren't used the "auto-load more" option - we have the "click to load more" button.

This doesn't happen with every load more click, and there doesn't seem to be any consistency about which load more it happens on - sometimes 1st click for more results, sometimes 5th click, sometimes 20th etc. - however once you have found somewhere where it goes wrong for a set of views results it will consistently go wrong for that set of results in that place - e.g. refresh and click load more same number of times and you will see the error again.

We are using the latest release - 8.x-1.5

In case it is relevant, our views results set are coming from a Search API query.

nickrhymes’s picture

Version: 8.x-1.3 » 8.x-1.5
YurkinPark’s picture

Issue summary: View changes

Hi, i think your site's content is refreshing very fast or output is cached. Case i'm trying to explain is 6th element on first loaded page is not 6th during obtaining next 6 elements but 7th (because of new article). Can you check this case?

martin.davidson’s picture

I can confirm nothing is changing and I'm also seeing this issue. It's happening on a test environment where no data is changing between page loads. The sort order was set to Authored On, and when I deleted the sort order it worked again. Whether it was because of the sort order, or it just refreshed it somehow, I'm not sure.

vakulrai’s picture

Status: Active » Needs review
FileSize
59.72 KB

You need to enable distinct in your advanced view settings .
This setting will give you unique results.

thanks's.

YurkinPark’s picture

Is this still possible to reproduce? if yes - can you prepare some workarea on github which we can use to see what happens?

chandrahas.d’s picture

Hi , I am using Infinite scroll module in one of the site that I am working on. I have written a hook_query_alter function and have added a 'not in' condition in the array of the query object. So after writing the query alter, one row is omitted as per the query alter as a part of the 'not in' condition. So the first item of the next set, came into the last item of the current set.

So when I click on 'Load More', the last item of first list and the first item of the next set of list are the same.

I am not able to find a solution for this.

Note: I have added the distinct condition as well.

Neslee Canil Pinto’s picture

Status: Needs review » Closed (cannot reproduce)