Skip Navigation

[Resolved] Filters/search not working properly

This support ticket is created 2 years, 6 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

This topic contains 3 replies, has 2 voices.

Last updated by Minesh 2 years, 6 months ago.

Assisted by: Minesh.

Author
Posts
#2402299

Dev site
See this page: hidden link

I have it set to change the URL when any filters are applied. YOu will see that that is no longer working (it used to work great).
Also, if you apply a filter and then hit reset, it does not reset.

This is a staging site with all other plugins disabled, so you can see and test the issue without plugin interference.

#2402501

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

I checked on your install and I can see you are using the following view:
=> hidden link

And when I change the filter I can see it throw the JS error:

Uncaught TypeError: jQuery(...).slick is not a function

And I can see that JS code is added to your view's JS box:

jQuery( document ).on( 'js_event_wpv_pagination_completed js_event_wpv_parametric_search_results_updated', function( event, data ) {
 
jQuery('.imgSlider').slick({
        autoplay: true,
        autoplaySpeed: jQuery('.imgSlider').attr('data-speed'),
        fade: true,
    });
 
    if(jQuery('.imgSlider').attr('data-hidecontrol') == 1){
        jQuery('.imgSlider .slick-arrow').hide();
    }
 
    jQuery('.testimonialSlider').addClass('style'+jQuery('.testimonialSlider').attr('data-t_style'));
 
    if(jQuery('.testimonialSlider').attr('data-t_style') != 3){
        jQuery('.testimonialSlider').slick({
            dots: true,
            autoplay: true,
            autoplaySpeed: jQuery('.testimonialSlider').attr('data-t_speed'),
            slidesToShow: jQuery('.testimonialSlider').attr('data-t_show'),
            slidesToScroll: 1,
            responsive: [{
              breakpoint: 900,
              settings: {
                slidesToShow: 2,
              }
            }, {
              breakpoint: 600,
              settings: {
                slidesToShow: 1,
              }
            }]
        });
 
        if(jQuery('.testimonialSlider').attr('data-t_show') > 1){
            jQuery('.testimonial').addClass('border');
        }
 
        if(jQuery('.testimonialSlider').attr('data-t_hidecontrol') == 1){
            jQuery('.testimonialSlider .slick-arrow').hide();
            jQuery('.testimonialSlider .slick-dots').hide();
        }
    }
 
 
    jQuery('.logoSlider').addClass('style'+jQuery('.logoSlider').attr('data-l_style'));
 
    if(jQuery('.logoSlider').attr('data-l_style') != '2'){
        jQuery('.logoSlider').slick({
            dots: true,
            autoplay: true,
            autoplaySpeed: jQuery('.logoSlider').attr('data-speed'),
            slidesToShow: jQuery('.logoSlider').attr('data-l_show'),
            slidesToScroll: 1,
            responsive: [{
              breakpoint: 1024,
              settings: {
                slidesToShow: 4,
              }
            }, {
              breakpoint: 600,
              settings: {
                slidesToShow: 2,
              }
            }, {
              breakpoint: 400,
              settings: {
                slidesToShow: 1,
              }
            }]
        });
 
        if(jQuery('.logoSlider').attr('data-hidecontrol') == 1){
            jQuery('.logoSlider .slick-arrow').hide();
            jQuery('.logoSlider .slick-dots').hide();
        }
    }
   
});

As soon as I remove the above custom JS from the JS box and save the view and check on frontend it updates the URL as expected so you will have to adjust the custom JS code you added.

#2403077

Ahhhhh - thank you! I forgot that was even there and the slider stopped working a while ago so I'm not even using that anymore, so I have removed it.

OK - one last question on that then. The URL is still not updating. Any ideas on how to get that working again?

Thanks so much!

#2403239

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Once I remove the code from view's JS box and save the from and delete the cache of browser I can see its working.

For me its working as expected and URL is updated after I change the filter.