Had to revert back to 7.x.21. After updating to 7.x.23, .js is no longer added to footer (it stays in the header) and on one site, after saving a node, all advagg .js aggregates are not added at all until cache is cleared. The .js files come back in header after, but this occurs every time a node is saved after cache clear.

CommentFileSizeAuthor
#12 advagg-2877882-fix-function-name.patch487 bytesmikeytown2
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Coupon Code Swap created an issue. See original summary.

tfranz’s picture

Maybe it has something to do with a "wrong function name" https://www.drupal.org/node/2877679:

Changing line 911 in advagg_mod.module seems to help:

// Helper Functions.
/**
 * Alter the js array.
 *
 * @param array $js
 *   JS array.
 */
- function advagg_mod_post_js_alter(array &$js) {
+ function advagg_mod_js_alter(array &$js) {
  if (!module_exists('advagg') || !advagg_enabled()) {
    return;
  }
Coupon Code Swap’s picture

I tried applying that hack and advagg .js files are still being removed. Back to 7.x.21...

mikeytown2’s picture

I switched it so it gets called outside of the alter. http://cgit.drupalcode.org/advagg/tree/advagg.module#n3981

wells’s picture

Also experiencing this on 7.x-2.23.

For the record, a work around to at least get JS to load is to go to /admin/config/development/performance/advagg/mod and change the Move JS to the footer option to Disabled. This, of course, keep JS in the header, but maintains compression and other features, if rollback is not an option.

mikeytown2’s picture

What other css/js sub modules are you using? What theme is being used?

wells’s picture

In my case -

Theme: Bootstrap 7.x-3.13

Sub-modules enabled:

  • advagg_bundler
  • advagg_css_compress
  • advagg_js_compress
  • advagg_mod
mikeytown2’s picture

magic module? CDN?

wells’s picture

No Magic, no CDN. I believe the only other front-end module I use is jQuery Update to use jQuery 1.10.

wells’s picture

Further note - I just tested this with a vanilla setup on simplytest.me. I was able to reproduce the issue with the following parts:

  • Advagg 7.x-2.23
  • jQuery Update (required for Bootstrap)
  • Bootstrap theme

I went through and mirrored my own settings and found that All but what is in the $all_in_footer_list option is part of the trigger. All other settings the same, changing this to All but JavaScript Libraries resolves the issue.

Let me know if you need a full description of the settings - or can I just send you the test machine URL?

Edit: Yeah, apparently it just auto-fills the password, so go nuts: https://dcozo.ply.st

  • mikeytown2 committed c98ce3a on 7.x-2.x
    Issue #2877882 by mikeytown2: Breakage after update to 7.x.23
    
mikeytown2’s picture

Status: Active » Fixed
FileSize
487 bytes

Back from vacation. Simple fix here.

wells’s picture

Tested and working. Thanks!

Coupon Code Swap’s picture

@mikeytown2 Thanks! That simple patch did the trick :)

TynanFox’s picture

#12 worked for me! Thank you so much!

Status: Fixed » Closed (fixed)

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