Forums › Forums › Search & Filter Pro › Autoptimize prevents the filter to work
Tagged: autoptimize, filter, js, speed
- This topic has 14 replies, 2 voices, and was last updated 6 years, 8 months ago by Trevor.
-
Anonymous(Private) March 2, 2018 at 5:52 pm #163347
Hi, I’ve been using Autoptimize along with WPML. Without any JS optimizations (unchecked), the filter works. With those checked, the filter does not work: selecting any category, creates no filter. Nothing at all. My guess is that some js must remain in the head section. My config below.
Can someone help me fixing this?
Thanks.Trevor(Private) March 2, 2018 at 6:11 pm #163355I do not understand Italian, sorry. I cannot translate it because it is an image.
Have you moved all js to the footer, and/or combine all the files?
You need to work out what all of the js on the page is and exclude it all, and check. Then add one, check, add another, check, and so on.
Trevor(Private) March 2, 2018 at 6:37 pm #163369To start with, ALL files. You need to examine you page code and see what there are. Autoptimize is a powerful tool, but must be used with great care. I cannot offer you support on using it, just to give you the general guidelines as to how you should approach the search for a workable solution. I have seen it used on other sites, and many that I see do not optimize the javascript. One file that can be difficult to optimize is the actual jQuery file itself.
Trevor(Private) March 5, 2018 at 6:38 am #163804Ah, I see. The main ones are these:
chosen.jquery.min.js
select2.min.js
search-filter-build.min.jsOnly one of the first two will be used, depending on the option you choose in the main plugin combobox script settings.
Our scripts are reliant on the main jquery.js (ver 1.12.4) script being loaded.
Anonymous(Private) March 5, 2018 at 10:52 am #163870Hi Trevor, thanks for the tips. I’ve inserted search-filter-pro/public/assets/js/. The one thing I’ve noticed, even though I have the AND method for the form filter /categories and tags), when I select a value the filter activates. After a first filter being loaded, I can perform the second filter. While the procedure works (I do get the articles I wanted), before using WPML and Autoptimize I could select both filters AND get a result. Is something wrong?
Thanks.
-
AuthorPosts