Hi,
When I use advagg without s3fs module enabled, it works fine and when I use s3fs module advagg breaks so looked into the issue what is causing it.
My domain URL is https://xyz.com and S3 path is https://YOUR-BUCKET.s3.amazonaws.com/s3fs-public/. All of the files (Media, JS, CSS) are already stored in S3 and being served from CloudFront. When I enable advagg all the CSS and JS disappears and Chrome console shows 500 error. Advagg looks for JS and CSS files in https://xyz.com/s3fs-js/js/js_uboTQ2hsTXIr0Zv5kIQP6wwQSBI8Ch3sgJFP0vWXdW... and https://xyz.com/s3fs-css/css/css_pYWjwj9eGpIwSA2ZeKeTjllI1C3wyreetxr93X4....
Is their a way for advagg points to https://YOUR-BUCKET.s3.amazonaws.com/s3fs-public/ rather than https://xyz.com/s3fs- when creating and serving Js and CSS aggregated files.
Thanks,
Javed Gardezi
Comments
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedhook_file_url_alter() should be able to do it. If the files are not getting saved in the correct spot then setting
$conf['advagg_root_dir_prefix']
and/or usinghook_advagg_get_root_files_dir_alter(&$css_paths, &$js_paths)
is what you're looking for.Comment #3
jgardezi CreditAttribution: jgardezi as a volunteer commentedmikeytown2 Thank and I have resolved it. https://www.drupal.org/node/2549025#comment-10630558
Comment #4
mikeytown2 CreditAttribution: mikeytown2 commented