Skip Navigation

[Resolved] wpv-views not updating with ajax filter

This support ticket is created 3 years, 10 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 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 9 replies, has 2 voices.

Last updated by emilyB-2 3 years, 10 months ago.

Assisted by: Shane.

Author
Posts
#1975005

Tell us what you are trying to do?
I am trying to not use a submit button, but ajax update in my view editor. Everything works fine except when the filtered loop items are displayed, everything that gets displayed in the loop item that is pulled from a [wpv-view] doesn't update. It remains the same as the first loop item when no filters were selected (so every item displays the same content).

I saw from https://toolset.com/forums/topic/view-is-not-displayed/, that having a [wpv-control-post-relationship] filter with shortcode behind it can cause problems in the filtering system.

The solution in that ticket was to remove [wpv-control-post-relationship], unfortunately I need that functionality. The loop editor works when I used a submit button instead of an ajax request. Do I have to pick between using my custom filter or using ajax? Or is there another work around.

Thanks

#1975065

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi,

Thank you for getting in touch.

In order to understand fully what is happening in your site's case I would need to have a look at the site itself.

Could you provide me with admin access to the site so that I can have a look ?

Also please send me the link to the view on the frontend.

Thanks,
Shane

#1975875

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

Lets focus on the original issue in this ticket. I've had a look at the search and the filters and the view seems to be updating normally when a filter item is selected.

Perhaps you can do a small video demonstration of the issue so that I can better understand. However as it is right now i'm not seeing any issues with the filters and the view content.

Thanks,
Shane

#1975905
views_problem2.PNG
views_problem.PNG

In the front end photo, this is after the filter has been used to select location. The services, areas of expertise, and I can also help with are populated with the exact same content. In the back end, you see that services gets it's content from [wpv-view]. So does areas of expertise and I can also help with.

locations is a taxonomy. It and the other content that come from [types] and [wpv-post-taxonomy] display the correct, different content that belongs to the persons profile.

The [wpv-view] content seems to just take the content that was in the first, unfiltered post and just used that for the rest of the times in the loop.

#1976043

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Emily,

Thank you for the clarity. If you have a look at this now you should see that the view is now filtering.

What I had to do was to manually pass the ID of the parent into the filter for this view by using the shortcode parameter attribute.

Can you double check to see if this is actually resolved now.

Thanks,
Shane

#1976147

Hey Shane,

Your fix worked for the services view, but not for the areas of expertise and I can also help with. If you can implement the same fix for those two views as well that would be perfect.

Thanks for the help

#1976151

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hello,

I've implemented the fix on the other 2 views as well.

Thanks,
Shane

#1976167

Hello,

The areas of expertise field is working fine now, but the "I can also help with is empty". Maybe you put in a typo?

Thanks

#1976177

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi,

This should now be fixed as well.

All 3 views should now be showing based on their respective post relationships.

Thanks,
Shane

#1976183

My issue is resolved now. Thank you!