If the js in the site is aggregated then the ajax load module will load "all" the module again instead of loading just the unloaded module.
Is this the default way for ajax load? is there anyway to avoid this?
thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | ajax_load.png | 12.37 KB | duckzland |
Comments
Comment #1
markus_petrux commentedIt works here. I do not recall if the fix is included in latest version, or it is just in the -dev tarball.
Comment #2
duckzland commentedTried the dev version today and the result still the same.
I've attached a firebug screenshot that re-loads the supposed to be aggregated js (example the admin.menu.js) on ajax call.
I'm using javascript aggregator module on top on the drupal standard aggregator.
Comment #3
webkenny commentedWe can confirm this with CSS as well. The offending code is:
Lines 69-72 of ajax_load.js - As you can see, it is checking to see if a link tag exists for a given style sheet and then adds it if not. Obviously in the case of CSS aggregation, most sheets won't exist via link unless you have explicitly placed them there outside of the normal Drupal way (e.g. a link tag in the tpl)
In some instances this causes entire layouts to break since the stylesheets are loaded after the aggregated CSS file therefore overriding what is set in the theme. Specifically we've noticed problems with the
.nestedclass of fusion_core.Note our example only uses the default Drupal aggregation found on the Performance page.
Comment #4
webkenny commentedAdjusting the title.
Comment #5
markus_petrux commentedThose lines do not exist in the latest code in CVS. See:
http://drupalcode.org/viewvc/drupal/contributions/modules/ajax_load/ajax...
Please, try latest dev version. It uses a different method to check if a particular stylesheet exists.
Related issue: #685918: Drupal.theme functions implemented by other modules are broken when javascript compression is enabled
Comment #6
webkenny commentedYou're right. Sorry about that. Marking as duplicate.