Skip Navigation

[Resolved] Ajax pagination for loop inside view inside template

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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 replies, has 2 voices.

Last updated by juliaH-2 1 year, 4 months ago.

Assisted by: Luo Yang.

Author
Posts
#2510625

I'm new to Toolset so I'm a bit lost by the huge amount of features. I took over a website from another developer who has built the site heavily using Toolset views and templates. The setting is as follows:
We have a content template (let's call it "CT1" and in that template a view (let's call it "V1") is rendered. This view V1 has a relationship filter. Via URL parameter wpv-relationship-filter we take the ID for a custom post type (let's call it "CPT1") and loop over the corresponding entries for another custom post type (let's call it "CPT2") in that relationship. We display the CPT2 entries in a table with some additional custom fields via [wpv-heading name="xxx"][/wpv-heading] and [types field='xxx'][/types]. All that works perfectly. The problem is: There is now a new CPT and this one has over 20,000 relationship entries. So I need to use AJAX pagination but I can't get it to work.

I tried to change the view settings from "show all results" to "show all results with pagination" and also tried to set the filters, search and pagination. But if I set it in the editor field for "search and pagination" those are not shown in the frontend. If I put it in the loop editor it's displayed in the frontend but doesn't work. Using the previous/next button there's only a javascript error in the dev console: "Uncaught TypeError: t.paged_views[r] is undefined".

I really can't figure out what's going on so I hope you can help me. Am I doing something wrong?
Thanks in advance for your help!

All the best

#2510917

Hello,

The problem you mentioned above is abnormal, please check these:
1) Backup your website first
2) Make sure you are using the latest version of Toolset plugins, you can download them here:
https://toolset.com/account/downloads/
click link "Download Toolset manually"
3) If the problem still persists, there might be other compatibility issue, please try to deactivate all other plugins, and switch to WordPress default theme, and test again.

#2511691

Hi again. Thanks for your answer. It helped me find a solution. In fact the view was embedded in a tabs element by the plugin Elegant Tabs for Fusion Builder. I restructured the elements and put the view outside the tabs and it worked. It was not easy to understand how the filtering, search, ajax pagination and the loop work together but after some hours of try and error I now have the desired result.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.