On my d8 site I have AdvAgg CSS/JS Validator
, AdvAgg Minify CSS
, AdvAgg Minify JavaScript
, AdvAgg Modifier
and Advanced CSS/JS Aggregation
enabled.
I have standard settings used in the AdvAgg config. For JS specifically, I am using JSmin + and delivering gzip'd assets.
Under admin/config/development/performance
, if Aggregate JavaScript files
is unchecked, my JS files are delivered from the js/optimized/
folder and JS runs correctly. When I check Aggregate JavaScript files
on, assets are now placed from /js/ and javascript is broken.
Further, when I paste the optimized file name in admin/config/development/performance/advagg/info
, for e.g.: js_nrTZ3IQttmDSsRueLl0pyxRvunHefp0r1WyIh5cFezg.js
AdvAgg cannot find the file (but it can when aggregation is turned off).
Perhaps this all makes sense since aggregating JS files is a Drupal feature, but I've been down every related question/comment thread on google (changing .htaccess, adding tmp folders, changing folder permissions etc) and cannot find a fix for: AdvAgg is on with standard config, Aggregating JS files is on and javascript is broken. There are no obvious errors in the javascript console or drupal error log either.
EDIT
Here is what the file paths look like with aggregation on:
<script src="/sites/energyforum/files/js/js_tvBcOK6c8zbgb2_h2fxvH7fqhBBhGUnfOtQvWyXg1AM.js"></script>
The files are actually there, e.g.:
Here is what they look like with aggregation turned off
<script src="/sites/energyforum/files/js/optimized/js_dxIVcwvQ00owLGoUGPTfRYXU-T5rnj8Xi0cXfb3Kn58.0EvW5goc0mi1CLAZ226j56yYkdNjFXiaCYoOaoBMbKg.js?v=3.2.1"></script>
And, of course, there are many more of them (and javascript works)