• Resolved Insomnia88

    (@insomnia88)


    I really liked the plugin so far but since the last updates it turns from a 5-star to 1-star because the js minification and combining is totally broken for all my pages. I havn’t change anything on my sites but it seems that the new minification and combining logic is ignoring the include order of the files. That’s why I get a lot of errors in my console because the scripts are not loaded in the correct order and completely breaks my sites.

    I read other topics about similar cases and you mentioned that it’s about the settings. Well the settings page has changed but I can’t see anything that will change the behaviour to the one of previous versions.

    • This topic was modified 3 years, 7 months ago by Insomnia88.
    • This topic was modified 3 years, 7 months ago by Insomnia88.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Insomnia88

    (@insomnia88)

    I rolled back to version 2.8.9 as a workaround. It’s perfectly working there.

    Plugin Author Raul P.

    (@alignak)

    You did not specify what sort of errors you are getting.

    If you are getting errors on the console, most likely is because you are not adjusting the settings after the update.

    The new version no longer does merging by default, as it’s no longer recommended for http2 servers. The order of scripts will be preserved, unless you are deferring scripts.
    If you are deferring scripts you also need to consider inline scripts dependencies, else obviously they will not load in order.

    Refer to the HELP tab on the plugin for recommended defaults, but note those are just defaults. Every site is different, and you may need different settings, which you need to find on your own as the plugin is for developers and advanced users.

    Thread Starter Insomnia88

    (@insomnia88)

    It wouldn’t help to name the errors because they are individual to my projects.
    I did read the HELP tab but this didn’t help.
    Yeah, minification is disabled by default. I enabled it and didn’t defer the scripts (I am not using http2 server).
    The problem still existed since the 3.x update.

    However: I upgraded the plugin again on one of my sites and it’s suddenly not breaking everything. Now I would upgrade the other plugins again but I am kinda afraid that it will break again someday. I will mark this as resolved because I have the feeling that it was a setup specific issue for me and not the plugin in general.

    Thread Starter Insomnia88

    (@insomnia88)

    UPDATE: The behavior is still not as expected after updating so I rolled back again. One thing I noticed it that you skip minified files. I would like to have an option for enabling/disabling it. The thing is that even though the files are already minified they are not merged together resulting in many single requests instead of 1 bigger one (which I would prefer).
    Also some files are not processed at all and I also have a theory for that. They are enqeued like the rest – even in the same function BUT they are not located in the same directory. In my case they are “global scripts” that are located on the same server at a central spot and are shared across multiple directories. The earlier version of the plugin didn’t mind. It copied them to the local folder and merged them like the rest.

    These are 2 big issues I noticed with the 3.x releases.

    • This reply was modified 3 years, 6 months ago by Insomnia88.
    Plugin Author Raul P.

    (@alignak)

    Double minification often causes errors with javascript, so it auto skips files based on the extension such as min.js or min.css

    Check if your ignore list is empty, else those will be excluded too.
    And check if minification is enabled, else it won’t do minification.

    The new version doesn’t care about enqueued files, it will read them all.
    For JavaScript, you need to manually specify paths, else it won’t process them.

    Post a screenshot of your FVM settings and your url, as well as which urls are not minified. Thanks

    Plugin Author Raul P.

    (@alignak)

    I have fixed a bug regarding some files not being minified. Please update to 3.2.0 and purge caches. Thank you

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘js minification is problematic after update’ is closed to new replies.