Skip Navigation

[Resolved] Using Ajax Filter with View Returning Blank, Full Page refresh on submit works

This support ticket is created 4 years, 3 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
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)

Tagged: 

This topic contains 5 replies, has 2 voices.

Last updated by aprilA 4 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#1399065

I am trying to: I am trying to use Toolset and Divi together for a product search page and wanted to use the Toolset Ajax function instead of requiring a full page refresh on submit. When I select an option from the dropdown and hit the submit button, the results return blank. If I switch the View to use full page refresh it returns the correct results.

Link to a page where the issue can be seen: hidden link
Access Info: toolset_access
Pass: toolsetview

Hopefully there is a workaround for this. Thanks

#1399239

Hi, there are some known issues with Divi and AJAX View results, as described here: https://toolset.com/documentation/recommended-themes/toolset-divi-integration/known-issues-between-divi-and-toolset/

You can try adding the suppress_filters attribute to your View's Loop template shortcode, if that template is constructed with Divi:

[wpv-post-body  view_template="your-divi-template-slug" suppress_filters="true"]

If that doesn't work, you can try the following troubleshooting steps:
- Temporarily deactivate all plugins except Types, Views, WooCommerce Views and WooCommerce
- Temporarily activate the parent Divi theme
- Test again
- If the problem is resolved, reactivate your child theme and other plugins one by one until the problem returns
- If the problem is not resolved, I can take a closer look but some of these AJAX issues are not easily resolved

#1399311

I did come across that known issues thread, but I am curious if I am just doing something wrong with my template setup. I have created the above changes and I have yet to be able to resolve the issue.

So what I am doing is creating the View then creating the loop with Divi Builder.
View Name: fixing-product-search
View Loop Content Template Name: loop-item-in-fixing-product-search

Inside the Loop Content Template I have set all of my [wpv-SHORTCODE-HERE] to look like this
[wpv-post-title view_template="loop-item-in-fixing-product-search" suppress_filters="true"] and it is returning the same results.

I have also tried this [wpv-post-title view_template="fixing-product-search" suppress_filters="true"].

Now on the sample page where I am placing the view should it also have suppress_filters or just be like normal?
[wpv-view name="fixing-product-search"]

#1399797

Ignore my reply above. I was able to get the ajax to return my values, but it completely is destroying my structure and styling now. The order in which the ajax returns the sections messes up the CSS styling. Thoughts around this?

#1399815

You wrote:

[wpv-post-title view_template="loop-item-in-fixing-product-search" suppress_filters="true"]

This is a post title shortcode, not a content template shortcode. Is it a typo? The correct shortcode for inserting a Content Template is wpv-post-body, not wpv-post-title:

[wpv-post-body view_template="loop-item-in-fixing-product-search" suppress_filters="true"]

Also the View shortcode should not include the suppress_filters attribute.

#1400119

My issue is resolved now. Thanks for helping. I was able to resolve my issues by ignoring Divi for building the template and just used divs with flexbox for my loop

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