Skip Navigation

[Resolved] Infinite scroll pagination creates duplicate results

This thread is resolved. Here is a description of the problem and solution.

Problem: I have a View that uses AJAX and infinite scrolling pagination. Sometimes after scrolling I see duplicate results.

Solution: In this case it's related to a third-party post order plugin causing conflicts with the query.

This support ticket is created 6 years, 1 month ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 5 replies, has 2 voices.

Last updated by christopherM-4 6 years ago.

Assisted by: Christian Cox.

Author
Posts
#1161665

I am trying to: Create a view that uses 'pagination enabled with manual transition and AJAX' with the transition effect 'infinite scroll' but I end up getting duplicate of some posts (not all). This issue only happens with infinite scroll. It does not duplicate posts if " choose 'fade' as the transition effect.

Link to a page where the issue can be seen: hidden link

I expected to see: No duplicate posts when using transition effect 'infinite scroll.' These posts are not duplicated in the database, but after an infinite scroll pagination event occurs, some (not all) posts are shown twice, such as "Embrey Mill Park" or "Chichester Park."

Instead, I got: Duplicate results of only some posts when using 'pagination enabled with manual transition and AJAX' with the transition effect 'infinite scroll.'

#1162441

Hi, please edit this View in wp-admin and scroll to the top right corner. Click "Screen Options", then check all the checkboxes to show all the options in the editor screen. Take screenshots of the View editor screen so I can see how everything is configured, and I'll give you some feedback.

#1166353
7-Screen Shot 2018-12-14 at 10.00.07 AM.png
6-Screen Shot 2018-12-14 at 9.59.59 AM.png
5-Screen Shot 2018-12-14 at 9.59.46 AM.png
4-Screen Shot 2018-12-14 at 9.59.17 AM.png
3-Screen Shot 2018-12-14 at 9.59.01 AM.png
2-Screen Shot 2018-12-14 at 9.58.49 AM.png
1-Screen Shot 2018-12-14 at 9.58.35 AM.png

Thanks for the reply! Here are screenshots of the view setup.

#1166386
Screen Shot 2018-12-14 at 10.06.19 AM.png

Forgot the pagination settings screenshot.

#1167165

I don't see anything obviously wrong here, so please try the following troubleshooting steps:
- Turn off View-level caching by adding the attribute cached="off" to the shortcode used to add this View to your site. Example:

[wpv-view name="Your View Name" cached="off"]

- Uncheck the checkbox "Don't include current page in query results" in the View editor screen
- In Search and Pagination settings, uncheck "preload images before transition", "cache pages", and "preload the next and previous pages".
- Update to the latest versions of all Toolset plugins.
- Temporarily deactivate all plugins except Types and Views, and activate the default Twenty Seventeen theme. Test again. If the problem is resolved, reactivate your theme and other plugins one by one until the problem returns.

Let me know the results of these tests, and we can go from there.

#1170726

Thanks Christian. It turned out the issue was with a plugin that we were using to customize the post order for another post type (known as Post Types Order) that didn't want to completely disable its functionality for the post types we were using in the view.

My issue is resolved now. Thank you!