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!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

aviindub’s picture

Issue summary: View changes
mikeytown2’s picture

I 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.

mikeytown2’s picture

Status: Active » Closed (works as designed)

Going to mark this as closed (works as designed). If this is not the case please let me know and re-open this issue :)

aviindub’s picture

Status: Closed (works as designed) » Active

I 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?

mikeytown2’s picture

Category: Support request » Bug report

Is there any way to prevent it from rendering the page with the extra script tags?

It 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().

aviindub’s picture

Sorry 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.

elysia_cron
zend
tracelytics
tracelytics_early
strongarm
block
webform
absolute_messages
addressfield
addthis
advagg
advagg_bundler
advagg_css_cdn
advagg_css_compress
advagg_js_cdn
advagg_js_compress
advagg_mod
advagg_validator
advanced_help
ajaxblocks
akamai
amazons3
amazons3_cors
apachesolr
apachesolr_search
apc_flush
awssdk
awssdk2
awssdk_ui
blog
boxes
browscap
cache_external_files
cck
color
colorbox
comment
commerce_coupon
commerce_coupon_expire
commerce_coupon_usage
commerce_custom_price
commerce_discount
commerce_discount_date
commerce_discount_usage
commerce_payout
commerce_product_bundle
commerce_purchase_order
commerce_return
contact
content_migrate
content_taxonomy
content_taxonomy_autocomplete
content_taxonomy_migrate
contextual
crumbs
ctools
current_search
custom_add_another
dashboard
date
date_all_day
date_api
date_popup
date_views
disqus
entity
entityreference
entity_token
facetapi
facetapi_i18n
field
field_collection
field_sql_storage
field_ui
file
filter
fivestar
flag
formblock
globalredirect
help
highcharts
highcharts_views
i18n_field
i18n_node
i18n_redirect
i18n_select
i18n_translation
image
imagecache_actions
imagecache_autorotate
imagecache_coloractions
imagecache_customactions
imagecache_profiles
imce
imce_wysiwyg
inline_conditions
inline_entity_form
jcarousel
libraries
link
list
locale
location
location_cck
location_user
logintoboggan
login_destination
mailsystem
markup
masquerade
memcache_storage
memcache_storage_pc
menu
metatags_quick
module_filter
mollom
multiselect
multi_terms
nagios
node
node_reference
number
opengraph_meta
opensesame_general
options
os_analytics
os_cdn_flush
os_course_backup
os_course_bulk_operations
os_course_component
os_course_editor
os_custom_ppu
os_external_api
os_geckoboard
os_helpscout
os_mixpanel
os_mq
os_sitemap
os_statsmix
overlay
page_title
panels
panels_mini
panel_variant_page_title
pardot
path
permission_watchdog
php
ptbp
quicktabs
quicktabs_tabstyles
realname
references
relation
relation_endpoint
relation_ui
reply
role_delegation
role_watchdog
rpx_core
rpx_rules
rpx_ui
rpx_widgets
rules_admin
rules_scheduler
s3fs
search
service_links
session_api
session_expire
simpletest
site_map
smartcrop
stringoverrides
subform
syslog
system
taxonomy
taxonomy_menu
term_reference_tree
text
tmgmt
tmgmt_field
tmgmt_i18n_string
tmgmt_locale
tmgmt_mygengo
tmgmt_node
tmgmt_node_ui
tmgmt_ui
translation
trigger
update
user
user_reference
user_voice
variable
views_bulk_operations
views_data_export
views_slideshow
views_slideshow_cycle
views_ui
votingapi
widget_services
wysiwyg
wysiwyg_linebreaks
commerce
commerce_product_attributes
field_group
nodeformcols
os_custom
pathauto
commerce_cart
commerce_checkout
commerce_customer
commerce_customer_ui
commerce_features
commerce_line_item
commerce_line_item_ui
commerce_order
commerce_order_ui
commerce_payment
commerce_payment_example
commerce_payment_ui
commerce_paypal
commerce_paypal_wpp
commerce_price
commerce_product
commerce_product_pricing
commerce_product_pricing_ui
commerce_product_reference
commerce_product_ui
commerce_ui
auto_nodetitle
i18n_menu
i18n_taxonomy
i18n
i18n_string
relation_select
token
views
panels_node
features
filefield_nginx_progress
manualcrop
rules
devel
os_commerce_tweaks
jquery_update
page_manager
admin_menu
better_formats
i18n_block
standard
tracelytics_late
mikeytown2’s picture

Ok so the repo case is when a block calls drupal_add_js() and that block is loaded via the ajax blocks module.

mikeytown2’s picture

Status: Active » Needs review
FileSize
475 bytes

I gotta run, but I briefly tested this patch and it seems to do the trick.

mikeytown2’s picture

Status: Needs review » Fixed
FileSize
2.06 KB

Following patch has been committed. Let me know if this doesn't fix the issue.

aviindub’s picture

the committed patch fixes the issue for me. thanks so much!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.