• Hello:
    After update to WP 5.3.
    Enabling the Autoptimize Optimize JavaScript Code option will break my site theme.
    The login page, menu, some images, pages with # will not work.
    I have to disable the option.
    Enabling the JS option improved my site speed, is there any remedy ?
    note: I have Also aggregate inline JS? & Force JavaScript in <head>? disabled .
    Thank You

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 19 total)
  • Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, so;
    * what JS errors do you see on the browser console when JS optimization is on?
    * what happens when you disable “aggregate JS”?
    * what happens when you keep “aggregate JS” on but add wp-content/themes to the comma-separated JS optimization exclusion list?
    * what happens when you keep “aggregate JS” on but add wp-content/plugins to the comma-separated JS optimization exclusion list instead?

    frank

    Thread Starter hashur

    (@hashur)

    Thank You

    Tried all above, same problem.
    please see this link for images of errors each images is for each of the choices above.

    https://pdhsource.com/ana/

    Thank You

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, do you have js/jquery/jquery.js in your JS exclusions? if not, can you try with that exclusion?

    Thread Starter hashur

    (@hashur)

    Yes. This is what I have now.
    wp-includes/js/dist/, wp-includes/js/tinymce/, js/jquery/jquery.js,wp-content/themes, wp-content/plugins
    Thank You

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    ok, did that change anything with regards to problems you were facing?

    Thread Starter hashur

    (@hashur)

    No
    The JS exclusions has been there foe a while, problem started with the latest WP update.
    Thank You

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, what happens when you untick “aggregegate Javascript”? Do problems remain?

    Thread Starter hashur

    (@hashur)

    yes

    Thread Starter hashur

    (@hashur)

    Sorry, problem is gone when I untick “aggregegate Javascript”
    Sorry.
    But I like to have it.
    it improved site speed ..
    Thank You

    Thread Starter hashur

    (@hashur)

    Again, Sorry, problem will go away only when I un click Optimize JavaScript Code? not aggregegate Javascript”

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    hmm … OK, what if;

    * optimize JS is on
    * aggregate JS is on
    * aggregate inline JS is off
    * minify excluded CSS/ JS is off

    and you try the following, separately,
    * exclude wp-content/plugins from JS opt.?
    * exclude wp-content/themes from JS opt.?
    * exclude wp-includes from JS opt.?

    Thread Starter hashur

    (@hashur)

    using exclude wp-content/themes from JS opt. is the only way things will work.
    All other exclusions did not work.
    Thank You

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    OK, you have 3 JS files loaded from there, you could try excluding them one by one to try to be even more specific in your exclusions.

    Thread Starter hashur

    (@hashur)

    Thank You
    Not sure I understand your request.
    I have this line in exclude script option: (has three js)
    wp-includes/js/dist/, wp-includes/js/tinymce/, js/jquery/jquery.js,
    This will work:
    wp-includes/js/tinymce/, js/jquery/jquery.js, wp-content/themes,
    and this will work too:
    js/jquery/jquery.js, wp-content/themes,
    Other combinations will not work.
    So I need to exclude theme and js/jquery for things to work.
    Thank You

    Plugin Author Optimizing Matters

    (@optimizingmatters)

    my point; your theme has 3 JS files, which are now all excluded, so you could try to exclude one of those 3 specifically instead of excluding the entire theme. if you want to know which theme-JS files, you can load your site with ?ao_noptimize=1 added to the URL (to disable AO for that request) and then view source and search for <script tags that have wp-content/themes in the URL 🙂

Viewing 15 replies - 1 through 15 (of 19 total)

The topic ‘Last WP update, Autoptimize JS issues’ is closed to new replies.