I have enabled advanced aggregation.

When i enable JS aggregation in the performance page and clear the cache, the it throws error in the console and that prohibits further execution of JS in the page.

I have added JS file to a page through a custom module. The JS file has some code which calls some function loaded through some internal JS libraries. I get error as function is undefined.

Example error :

  • "TypeError: Drupal.ajax is undefined"
  • "TypeError: $(...).functionname is not a function"

The module advagg creates a folder in the filesystem as "advagg_js" and after enabling aggregation it combines the content of multiple JS files into a single js file.

I am confused the way it combines and loads it in the page.

Can somebody throw some light in this regard?

Thanks,
Nisith

Comments

Nisith created an issue. See original summary.

mikeytown2’s picture

Does the JS work with core aggregation and not advanced aggregation turned on?

mikeytown2’s picture

Status: Active » Postponed (maintainer needs more info)

Need more info to continue.

mikeytown2’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)