Skip Navigation

[Resolved] Ajax filter trigger multiple views on the same page.

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

Problem:

Show 3 different views with Ajax filter on a content template page:

view #1 [wpv-view name="legislation-state"]

view #2 [wpv-view name="legislation-state" status="Enacted"]

view #3 [wpv-view name="litigation-state"]

Ajax filter trigger multiple views.

Solution:

This is a known issue of Views plugin, it has already been put into our to-do list of Views plugin version 2.8, as you can see current version of Views plugin is 2.7.3, I don't think it will be fixed soon.

As a workaround, you can create another post view(for example "legislation-state-2") with same settings as view "legislation-state", and put it into the same page and replace the second instance of shortcode :

view #2 [wpv-view name="legislation-state" status="Enacted"]

To:
view #2 [wpv-view name="legislation-state-2" status="Enacted"]

And test again.

Relevant Documentation:

This support ticket is created 5 years, 11 months 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
- 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 5 replies, has 2 voices.

Last updated by abrahamL 5 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1200800

I am trying to: Show 3 different views with Ajax filter on a content template page.

Link to a page where the issue can be seen: hidden link
that page using content templates # 17740: Template for States
view #1 [wpv-view name="legislation-state"]
view #2 [wpv-view name="legislation-state" status="Enacted"]
view #3 [wpv-view name="litigation-state"]

view #1 & #2 (CPT: Legislations)
view #3 (CPT: Litigations)

I expected to see: Each view trigger by its ajax filter.

Instead, I got: Ajax filter trigger multiple views.
view #1 Ajax filter works well
view #2 Ajax filter trigger view #1
view #3 Sometimes it works, sometimes it doesn't.

#1200815

Thanks for the details, I can login into your website, will update here if there is anything found

#1200836

Here are what I found:
This is a known issue of Views plugin, it has already been put into our to-do list of Views plugin version 2.8, as you can see current version of Views plugin is 2.7.3, I don't think it will be fixed soon.

As a workaround, you can create another post view(for example "legislation-state-2") with same settings as view "legislation-state", and put it into the same page and replace the second instance of shortcode :
view #2 [wpv-view name="legislation-state" status="Enacted"]

To:
view #2 [wpv-view name="legislation-state-2" status="Enacted"]

And test again.

#1200847

Thank you for helping me Luo,

I made a duplicate of "legislation-state", and name it "legislation-state-enacted", and set up query filter status=enacted.
so, view #2 [wpv-view name="legislation-state-enacted"]

But it still didn't work, views #2 still trigger view #1. Looks like it didn't work if the post type are the same.

#1200855

Thanks for the feedback, the problem is abnormal, please check these:
1) In case it is a compatibility problem, please deactivate other plugins, and switch to wordpress default theme 2019, and test again
2) If the problem still persists, please provide database dump file(ZIP file) of your website,I need to test and debug it in my localhost, thanks
https://toolset.com/faq/provide-supporters-copy-site/

#1202008

My issue is resolved now. Thank you!