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
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
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
OK, what happens when you untick “aggregegate Javascript”? Do problems remain?
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”
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
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
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 🙂