Home › Toolset Professional Support › [Resolved] Infinite Scrolling not working correctly on view
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.
Our next available supporter will start replying to tickets in about 4.80 hours from now. Thank you for your understanding.
This topic contains 8 replies, has 2 voices.
Last updated by Christopher Amirian 7 months, 2 weeks ago.
Assisted by: Christopher Amirian.
Tell us what you are trying to do?
I have set up a view that loops through and two custom post types and returns certain fields for each post that belong to the logged-in user.
This view is set to Infinite Scrolling with Pagination enabled with manual transition and AJAX. However, when scrolling down the list of posts on the front end, the page freezes when reaching the end of the list before adding new posts to the page. It is not a smooth transition, and it is difficult to scroll to find the posts that are at the top of the list.
Also, this view contains an edit button for each post that is queried. After the pagination, the Edit buttons no longer work. If the page is refreshed, then the edit buttons work again.
How do I make this work properly with Infinite Scrolling?
What is the link to your site?
hidden link
The page with the view is only viewable to the logged-in user.
Hi there,
Would you provide the debug information according to doc below?
https://toolset.com/faq/provide-debug-information-faster-support/
Also, I wonder if the same characteristics you mentioned are happening in minimal installation. To test that please follow the steps below:
- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Switch to the default theme such as "TwentyTwenty" by going to "WordPress Dashboard > Appearance > themes".
- Go to "WordPress Dashboard > Plugins" and deactivate all plugins except Toolset and its add-ons.
- Check if you can still recreate the issue.
- If not, re-activate your plugins one by one and check the issue each time to find out the plugin that causes the problem.
Thanks.
Debug information provided
I deactivated plugins and tried 2024 theme.
With all other plugins deactivated, the infinite scrolling does not work. I set this to display 5 items. The first 5 items are displayed, but no more items are added to the page when scrolling to the end.
I switched from:
Pagination enabled with manual transition and AJAX Display the query in pages, which visitors will switch without reloading the page.
to:
Pagination enabled with automatic AJAX transition Display the query in pages, which will paginate automatically without reloading the page.
The display flashed each time I tried to scroll up or down. I really can't tell how many items are displayed due to the flashing and inconsistent scrolling with the automatic transition enabled.
Hi there,
Thank you for the test, we need to be able to test it on a minimal installation to make sure there is no plugin or theme code interfering with the script of Toolset.
The fact that you said it is not working with 2024 theme is strange. I am not sure why that might be.
Please provide us with the login information of a staging version / copy of the website that we can freely work on and you should have a backup so if something goes wrong you will have a point of reference.
Also give us the link to the front end and the view on the backend that you enabled the infinite scroll.
We will deactivate all other plugins and use default theme to test and see if the infinite scroll works or not.
Please make sure you mark the next rely as private.
Thanks.
Hi there,
Thank you for the info. I checked the issue and could not find why this is happening. As you used the same view on the other page and it works, it indicates that other parts of the page, that might be a Javascript code or maybe a wrong HTML code causes the issue .
The way that Toolset Ajax works is it replaces the content section of the listing with new content.
The way it chops on the page indicates that there must be a wrong closing HTML or maybe another Javascript code on that page that prevents the smooth replacement.
One other possibility is that the page in question is corrupt and try to use another page with the same design to add the view in and see the result
Thank you.
It is actually a different view on the page that works. However, the view that does not work includes jQuery as you have observed. I will disable the infinite scroll on the page that does not work and troubleshoot later.
Thank you for taking a look.
Thank you.
So I'd appreciate it if you follow the steps below:
- Remove the extra jQuery code and see if it works ok.
- See if you copy the View and add a new one it fixes the issue or not.
Most probably the additional jQuery or some wrong HTML code inside the view causes the issue.
Thanks.