I am trying to update my production site from 7.x-2.0rc2 to 7.x-2.3. It seems to work fine except that i am getting an additional set of aggregates that look like the ones generated by core drupal. In other words, i am getting all the expected advagg files that have filenames like sites/default/files/advagg_js/js__[hash]__[hash]__[hash].js, and a second set of files with names like sites/default/files/js/js_[hash].js. The advagg files appear to be complete, as everything works even when the extra files can't be downloaded. This happens on every page, and does not happen with the older version of advagg.
Is this anything you have encountered? might you know how to resolve it?
thanks!
Comment | File | Size | Author |
---|---|---|---|
#9 | advagg-2153217-9-clear-scripts.patch | 2.06 KB | mikeytown2 |
#8 | advagg-2153217-8-clear-scripts.patch | 475 bytes | mikeytown2 |
Comments
Comment #1
aviindub CreditAttribution: aviindub commentedComment #2
mikeytown2 CreditAttribution: mikeytown2 commentedI know that for the majority of ajax requests, it is impossible to not have Drupal generate its own aggregates.
ajax_deliver() -> ajax_render() -> drupal_get_js() -> drupal_build_js_cache().
For CSS drupal core is a little nicer and allows advagg to handle calls to drupal_get_css.
Recent changes did go into AdvAgg's ajax handling #2122237: Compatibility problem with Media module's media browser popup. Unfortunately there isn't a good way to prevent ajax requests from generating core aggregates.
Comment #3
mikeytown2 CreditAttribution: mikeytown2 commentedGoing to mark this as closed (works as designed). If this is not the case please let me know and re-open this issue :)
Comment #4
aviindub CreditAttribution: aviindub commentedI can't tell whether the issue i am seeing is "works as designed" or not. I think you are correct that it is related to ajax, as it seems to be the ajaxblocks module (ajaxblocks_preprocess_html) that is calling in to theme() and adding those extra script tags. But it's not actually the ajax request that is making it happen, but rather the rendering of the ajax-enabled elements on the page.
the number one reason i suspect this is fixable is that the issue is not preset on my current production codebase, which is running advagg 7.x-2.0rc2. But when i switch it over to any release version of the 2.x branch of advagg, the issue appears. Everything else is exactly the same... same core, same modules, same database, the only difference between the case where the issue happens and the case where it doesn't happen is the advagg version.
if we can't stop drupal from generating those extra aggregates, is there any way to prevent it from rendering the page with the extra script tags?
Comment #5
mikeytown2 CreditAttribution: mikeytown2 commentedIt wasn't clear that double inclusion of aggregates was happening (core & advagg). I could classify this as a bug then; and yes we should be able to remove them. I can't stop the generation of core aggregates without overwriting a lot of code. I'm fairly certain #2122237: Compatibility problem with Media module's media browser popup is what broke this in your case.
If I could get a list of all modules you have enabled, that would hep me just in case ajaxblocks isn't the only thing altering it. Note for me - Functions to look into: ajaxblocks_ajax_handler() & ajaxblocks_preprocess_html().
Comment #6
aviindub CreditAttribution: aviindub commentedSorry i was not clear about that.
Here is the result of module_list()... the ones prefixed by 'os_' are my shop's custom modules, which as far as i know do not implement any hooks that interfere with the page rendering process.
Comment #7
mikeytown2 CreditAttribution: mikeytown2 commentedOk so the repo case is when a block calls drupal_add_js() and that block is loaded via the ajax blocks module.
Comment #8
mikeytown2 CreditAttribution: mikeytown2 commentedI gotta run, but I briefly tested this patch and it seems to do the trick.
Comment #9
mikeytown2 CreditAttribution: mikeytown2 commentedFollowing patch has been committed. Let me know if this doesn't fix the issue.
Comment #10
aviindub CreditAttribution: aviindub commentedthe committed patch fixes the issue for me. thanks so much!