Closed (fixed)
Project:
AdaptiveTheme
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
14 Dec 2010 at 23:09 UTC
Updated:
31 Dec 2010 at 01:30 UTC
As a followup to #913972: [Regression] Add an option for CSS/JS aggregation into a big file each
-> The atheme css and js files will not get included in the "big" aggregated version of the js or css
-> Schemes are not working, when css aggregation is turned on
I'm using the latest dev version of atheme with a fresh subtheme ( which has schemes working correctly when aggregation is turned off ).
Comments
Comment #1
Jeff Burnz commentedI will test this tonight, cheers.
Comment #2
Jeff Burnz commentedI had not updated drupal_add_css for style schemes, I have fixed this and committed to head, the change is in template.php (the subthemes template.php), around line 21 it will now look like this:
This should be fixed.
Its kind of odd about the js, I too cannot find them (the js files loaded via drupal_add_js) in the aggregated files, but, they keep on working so they must be loaded somewhere? The one js file loaded via the info file is there (at.js).
Comment #3
XiaN Vizjereij commentedThat makes the schemes working again, but still all the css files are seperate
Thats probably, because drupal_add_js/css has a new "preprocess" option that needs to be set in order to get into the "big" file.
See http://drupal.org/update/modules/6/7#drupal_add_js_options
Comment #4
Jeff Burnz commentedI will test some more, the way I read it cache and preprocess default to TRUE http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_ad..., need to lookup drupal_add_css again to see what the story us there, I would think its the same, with aggregation being the default setting.
Comment #5
XiaN Vizjereij commentedDoesn't
$options['preprocess'] = $options['cache'] ? $options['preprocess'] : FALSE;defaults preprocess to false? The values deeper into the function are the defaults for the drupal.js as far as i understand it. AlsoAnd
implies that the default is false. The same applies for the drupal_add_css function.
Comment #6
Jeff Burnz commentedDid you test it out, what were your results? A patch would be pretty good :)
Comment #7
Jeff Burnz commentedI tested with the various drupal_add_js options such as preprocess, cache and group and none made any difference to aggregation (with regards to the number of aggreated files).
I also compared the number of aggregated files to Garland and in comparison Adaptivetheme adds just one more aggregated JS file. None of the themes I tested with have one big JS or CSS file, there always seems to be 6 CSS files and 3 or 4 JS files (only tested a couple of themes).
Comment #8
XiaN Vizjereij commentedI can confirm that. Tested some cases also and non are working. I'll reopen the bug report on drupal core.
Comment #9
int commentedplease use this:
#913972: [Regression] Add an option for CSS/JS aggregation into a big file each
Comment #10
XiaN Vizjereij commentedOk apparently that ... is ... working as intended .. kind of. Another change in D7 i will probably never understand. That might make sense from a core developers point of view, but for me as end user and administrator this simply adds massive I/O on my cache folder, 7 new HTTP requests per page view and more objects ( the parallel download problem ) >.<
As for at_theme ... Jeff, could you please have a look over the theme and make sure that all drupal_add_* have the correct group and preprocess enabled where it makes sense? Because its still FALSE by default.
Comment #11
Jeff Burnz commented@10 Yep, will make sure this is done.
Comment #12
Jeff Burnz commentedThe options have been added + committed to head, so marking as fixed.