Skip Navigation

[Resolved] CSS Classes reset in Toolset View

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

Last updated by manakM 3 years, 1 month ago.

Assisted by: Minesh.

Author
Posts
#2252511

I am trying to:

Hide search and filter in toolset archives on load and reveal it when clicking on a button.

Link to a page where the issue can be seen:

hidden link
hidden link Clicking the "Filter" button at the top revels the filters momentarily but then resets the classes.

I expected to see:

I have set up the following javascript to reveal the search and filter on clicking the "filter" button. So I expected to see the search and filter controls revealed after clicking the button.

jQuery(document).ready(function () {

    jQuery(".show-more").click(function() {
        jQuery(this).addClass("hidden-item");
        jQuery(".more-content").removeClass("hidden-item");
    });

});

Instead, I got:

But the classes seem to reset and hide the search and filter soon afterwards.

#2253297

Minesh
Supporter

Languages: English (English )

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

Hello. Thank you for contacting the Toolset support.

Can you please share admin access details and let me see whats going wrong with your setup.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2253495

Minesh
Supporter

Languages: English (English )

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

I'm not sure whats going on here as when I check the archive once the archive loaded it keeps updating archive automatically for 7-8 times and that is why when you click on the "filter" link it will show you the filter form for a moment and then suddenly disappear.

If you load the archive and then wait for 30 seconds and then if you click on the "filter" link, it is working as expected.

This is not a normal behavior. Archive should not keep updating for 7-8 times. Did you added any custom scripts? If no:
Can you please try to deactivate plugins one by one and check if you able to find any plugin causing the conflict.

#2253611

Hi, thanks for checking on this. I did not add any script that I know of that could cause this problem. I removed all the custom js and checked, but that did not fix the issue for me. What is even more curious is that certain archives do not experience this issue such as hidden link . As you might notice, I have copied the site onto a staging link, you can login with the same credentials as the main site. Please let me know if you are able to discern anything more about the issue.

#2254099

Minesh
Supporter

Languages: English (English )

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

I see the difference between the filters you added.

With the following archive - I do not see any checkboxes filter added as button: hidden link

But on this archive page: hidden link
- You added the checkboxes filters as buttons. Please check the following screenshot: hidden link

Toolset do not offer any way to display checkboxes as buttons you must have added some script to make checkboxes as button. What if you remove that filters for a moment and see if you able to see the toggle working as expected. If you found it working then you know that the issue is from the checkboxes filter you added as buttons.

As shared, this is not a normal behavior at all and there is some conflict either JS or any other custom code you may have added to your site as if you create a new archive using Toolset, it will not behave such like updating archive for 5-8 times for 30-50 seconds.

#2254745

Hey,

please check this page where I have removed all scripts and css for the taxonomy buttons : hidden link . The issue is still there. Also, you will notice the issue on this page as well where no buttons are used for the taxonomy: hidden link . I have also deactivated all non toolset plugins and removed all scripts other than the following that might be causing the issue.

jQuery(document).ready(function () {
 
    jQuery(".show-more").click(function() {
        jQuery(this).addClass("hidden-item");
        jQuery(".more-content").removeClass("hidden-item");
    });
 
});

Please verify and help diagnose the issue.

Warm Regards,

#2254773

Minesh
Supporter

Languages: English (English )

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

What if you delete the existing archive and build a new one and check if that helps? If not, I will have to debug it further.

#2257265

Hi Minesh,

Sorry for the delay, I couldn't find the time to remake the archive till today. Here it is: hidden link . Remade it from scratch, but the issue is still present unfortunately. Please help with further debugging, thank you!

#2257355

Minesh
Supporter

Languages: English (English )

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

Can you please check now: hidden link

I've made change to your live site after finding the fault on the staging site. You were using wrong pagination option. I've set the pagination option to "Pagination enabled with manual transition and page reload" and I can see its working now. Can you please confirm it works at your end as well.

#2257363

Hey, I want to use infinite scrolling for these archive pages, not manual transition.

#2257379

Minesh
Supporter

Languages: English (English )

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

Ok. I've added the following code "Custom JS" section of the archive to your staging site and also set the pagination method to "Pagination enabled with manual transition and AJAX" and 6 result per page with infinite scroll. Please check the following screenshot: hidden link

jQuery(document).ready(function () {
 
   jQuery(".show-more").click(function() {
        jQuery(this).addClass("hidden-item");
        jQuery(".more-content").removeClass("hidden-item");
        
    });
  
  jQuery( document ).on( 'js_event_wpv_pagination_completed', function( event, data ) {
	/**
	* data.view_unique_id (string) The View unique ID hash
	* data.effect (string) The View AJAX pagination effect
	* data.speed (integer) The View AJAX pagination speed in miliseconds
	* data.layout (object) The jQuery object for the View layout wrapper
	*/
      jQuery(".show-more").click(function() {
        jQuery(this).addClass("hidden-item");
        jQuery(".more-content").removeClass("hidden-item");
        
    });

});

});

Can you please confirm it works as expected: hidden link

#2257419

My issue is resolved now. Thank you!