First of, I want to thank you for this truly great project, amazing work!
I recently had some problems with cron breaking the css/js and it turned out to that system_cron
invalidated the cache_advagg_aggregates
and cache_advagg_info
caches. Simply clearing those made the css load once again.
I might add that it seems that it's only css files split into parts with selector limitor that arent loaded. The first part of the splits is, but not the others.
Currently it's not a problem for me personally as I can just clear those caches after cron runs but it seems to be either a bug, or something which could be incorporated in the module. What do you think?
Oh and I'm only running advagg
, advagg_css_compress
and advagg_bundler
(bundling is disabled).
Comment | File | Size | Author |
---|---|---|---|
#12 | advagg-system_cron_issue-2216825-12.patch | 2.21 KB | mrmikedewolf |
#10 | advagg-system_cron_issue-2216825-10.patch | 2.21 KB | mrmikedewolf |
#5 | advagg-cron-cache-2216825-5.patch | 784 bytes | mpotter |
Comments
Comment #1
oxyc CreditAttribution: oxyc commentedComment #2
mikeytown2 CreditAttribution: mikeytown2 commentedCan I get more details on this?
Comment #3
oxyc CreditAttribution: oxyc commentedI was able to reproduce it on a new installation as well, so it's definitely a bug.
Setps.
Next add a large css file to the theme, for example:
Configure it to limit css selectors:
admin/config/development/performance
and check Aggregate and compress CSS files.admin/config/development/performance/advagg
and check Prevent more than 4000 CSS selectors in an aggregated CSS file. I also set the limit to 4000.Finally to reproduce the problem:
curl --silent http://advaggtest.example.org/ | grep "<link" | wc -l
: 8admin/config/system/cron/execute/system_cron
curl --silent http://advaggtest.example.org/ | grep "<link" | wc -l
: 6Expected result on the last
count should be 8 but the css parts are not loaded. Clearing the cache or more specifically the advagg caches, makes it work again.
curl --silent http://advaggtest.example.org/ | grep "<link" | wc -l
: 8Comment #4
jaydub CreditAttribution: jaydub commentedI was having this problem too and it seemed to correct itself when advagg was disabled or as noted when the max selectors option was disabled.
However now that I've disabled the max selectors option, cleared cache, loaded pages, then reenabled the selectors, cleared cache, loaded pages (after making edits) now I don't seem to be running into the problem. Will stay tuned in case I see issues again.
Comment #5
mpotter CreditAttribution: mpotter commentedI am also having this problem. Here is a patch that seems to solve it, but not sure if this is exactly what needs to be done. I defer to the module maintainer to tweak this.
Comment #6
mikeytown2 CreditAttribution: mikeytown2 commentedComment #7
rael9 CreditAttribution: rael9 commentedFYI, this patch seems to work well for me. I thought it was an issue with secure_site, but this seems to actually be the issue/resolution.
Comment #8
oxyc CreditAttribution: oxyc commentedI'm still seeing issues with this patch, not sure if it's some different issue though.
Nevermind I noticed I had my custom cron setup set so advagg could run before system_cron. Guessing it will work when I adjusted it to run after system_cron.
Comment #9
rael9 CreditAttribution: rael9 commentedGood call, oxyc. I started having issues again, too. I updated my settings to weight advagg after system_cron in my elysia_cron settings. I'll report back if that fixed my continuing issues.
Comment #10
mrmikedewolf CreditAttribution: mrmikedewolf commentedWe ran into this issue on a project we were working on where we need to split up our stylesheet due to IE < 10 max selectors in a file rule. Thanks to #5 for identifying and patching the issue. We found, however, that we also needed to change the Advagg modules weight in the system table as per #8 and #9. I've updated the patch to implement this weight change both on enable and as an update.
Comment #11
rael9 CreditAttribution: rael9 commentedJust a quick update, since changing the order of the cron jobs so that advagg cron is running after system cron, we haven't had any further issues thus far.
Comment #12
mrmikedewolf CreditAttribution: mrmikedewolf commentedDoh, stupid mistake in my patch, I weighted Advagg less than system during updates, not more. Never code too hastily.
Comment #13
rael9 CreditAttribution: rael9 commentedI have had 1 incident of this happening again since the cron order change on the 10th. I couldn't find anything in the logs pertaining to this, but it some what troublesome that it did happen again, even as an isolated incident.
Comment #14
mikeytown2 CreditAttribution: mikeytown2 commentedThis should fix it
#2230047-1: Use drupal alter for advagg_get_info_on_file(s)
Note that http://drupal.org/project/css_emimage will need to be patched as well.
Comment #15
mikeytown2 CreditAttribution: mikeytown2 commentedNew patch that doesn't need a css_emimage patch
#2230047-2: Use drupal alter for advagg_get_info_on_file(s)
Comment #16
Fabianx CreditAttribution: Fabianx commentedUhm, this whole section should be after the !$bypass_time_check ...
Else this is pretty senseless.
We altered out the implementation of advagg_flush_caches via module_implements_alter() and now only 24 hours caches are rebuild instead of 10 min ...
Comment #17
mikeytown2 CreditAttribution: mikeytown2 commentedGoing to mark this a duplicate of #2230047: Use drupal alter for advagg_get_info_on_file(s) as I believe this issue has been fixed in there.