Problem/Motivation
Batch compression shouldn't try to compress files that have been "disabled" in the UI.
Steps to reproduce
In Drupal 7 with the FontAwesome module, I've configured AdvAgg to compress javascript and have disabled sites/all/libraries/fontawesome/js/all.js from being compressed in the "Per File Settings" section. However, regardless of this, the JS batch compression task fails while trying to compress the file that should have been ignored and then blocks other remaining items from being compressed in the batch process as well.

An error occurred while processing advagg_js_compress_batch_process with arguments:
Array
(
[filesize] => 3969933
[mtime] => 1597208083
[filename_hash] => lmROUSRAna3B-4fBjp4KTvvYRFV59pIK3Y99fR3-qIY
[content_hash] => lgJ89a9idqI2J67OAysZbin4iIA5nhgYqPz14jSiK2E
[linecount] => 7966
[data] => sites/all/libraries/fontawesome/js/all.js
[fileext] => js
[cache_id] => advagg:file:lmROUSRAna3B-4fBjp4KTvvYRFV59pIK3Y99fR3-qIY
[advagg_js_compress] => Array
(
[1] => Array
(
[code] => -1
[ratio] => 0
[name] => jsminplus
)
[2] => Array
(
[code] => -1
[ratio] => 0
[name] => packer
)
[4] => Array
(
[code] => -1
[ratio] => 0
[name] => jshrink
)
[5] => Array
(
[code] => -1
[ratio] => 0
[name] => jsqueeze
)
)
[advagg_mod] => Array
(
[contents] => Array
(
[drupal] =>
[drupal.settings] =>
[drupal.behaviors] =>
[jquery] =>
)
)
)
Proposed resolution
Don't batch compress assets that have been set to "Disabled" in the "Per File Settings".
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
jwilson3Generalizing the title, because I don't think this has anything to do with the selected compression tool — this is a general bug in the module.
Batch compression shouldn't try to compress files that have been "disabled" in the UI.
Comment #3
jwilson3Comment #4
marthinal commentedI've created a patch.
Comment #5
marthinal commentedComment #6
jwilson3Thanks @marthinal.
Patch works as advertised, to exclude specific files selected via the UI from batch compression tasks.
RTBC
Comment #8
thalles