Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Found too many stale JS aggregates in advagg_js folder not cleaned up by cron job even though atime is more than 30 days. Looks like bug in advagg.cache.inc line 177 - missing $ in the regular expression in fact excludes all JS files in advagg_js folder:
function advagg_delete_stale_aggregates() {
list($css_path, $js_path) = advagg_get_root_files_dir();
// Get a list of files.
$css_files = file_scan_directory($css_path[0], '/.*/', array('nomask' => '/(\.\.?|CVS|\.gz)$/'));
$js_files = file_scan_directory($js_path[0], '/.*/', array('nomask' => '/(\.\.?|CVS|\.gz)/')); // MISSING $ - end of string
// Make the advagg_get_hashes_from_filename() function available.
module_load_include('inc', 'advagg', 'advagg.missing');
$css_files = advagg_delete_files_if_stale($css_files);
$js_files = advagg_delete_files_if_stale($js_files);
return array($css_files, $js_files);
}
Use 7.x-2.7, but should be also reproducible on dev version. I'll attach a patch right away when I check that it works.
Comment | File | Size | Author |
---|---|---|---|
#2 | advagg-2340653-1-fix-regex.patch | 648 bytes | mikeytown2 |
Comments
Comment #2
mikeytown2 CreditAttribution: mikeytown2 commentedThanks for the bug report. Issue has been fixed with this patch