Forums Forums Search & Filter Pro Autoptimize prevents the filter to work

Viewing 10 posts - 1 through 10 (of 15 total)
  • Anonymous
    #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.

    screenshot

    Can someone help me fixing this?
    Thanks.

    Trevor
    #163355

    I 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.

    Anonymous
    #163362

    My settings were:
    Optimize JS code: ON
    Force JS in head: OFF
    Also aggregate inline JS: ON

    Which JS should I exclude?

    Thanks in advance.

    Trevor
    #163369

    To 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.

    Anonymous
    #163431

    Hi, I’m starting with the basic config, excluding jQuery. It works. Thing is, S&F Pro does not. So it must be (I guess) linked to your plugin. I’m NOT complaining, btw. Just aasking if you knew which JS to exclude.

    Trevor
    #163434

    I assume that you excluded our core js file?

    Anonymous
    #163533

    I think so. Gotta find which is are yours…

    Anonymous
    #163535

    Sorry, auto-correct. I meant JS.

    Trevor
    #163804

    Ah, I see. The main ones are these:

    chosen.jquery.min.js
    select2.min.js
    search-filter-build.min.js

    Only 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
    #163870

    Hi 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.

Viewing 10 posts - 1 through 10 (of 15 total)