Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The current checkbox title is Aggregate and compress CSS files.
. This checkbox sets the config key system:performance:css.preprocess
. CSS compression is controlled by system:performance:css.gzip
The checkbox title should be Aggregate CSS files.
There is no UI for CSS compression. By default, it is enabled.
Comment | File | Size | Author |
---|---|---|---|
#26 | css and js aggregation.jpg | 64.54 KB | Vidushi Mehta |
#6 | 1926228.css_gz_gzip_admin.6.patch | 2.58 KB | alexpott |
#5 | css-js-preprocess-label-1926228-5.patch | 3.64 KB | David_Rothstein |
#4 | css-js-preprocess-label-1926228-4.patch | 877 bytes | David_Rothstein |
#1 | drupal8.css_preprocess_label-before.png | 27.5 KB | andymartha |
Comments
Comment #1
andymartha CreditAttribution: andymartha commentedI can confirm that the patch in the summary changes the text for the user in a Drupal 8.x-dev installation from March 6, 2013 to "Aggregate CSS Files". See screenshots.
Comment #2
webchickNice catch. :)
Committed and pushed to 8.x. Thanks!
Comment #3
David_Rothstein CreditAttribution: David_Rothstein commentedI don't understand this patch. When I click the checkbox the files are gzipped and when I unclick it they aren't. So what was wrong with the original label?
The fact that there is a second variable does mean there's like a 1% use case where this isn't true but I think it's fine for our UI text to be optimized for the 99% :)
Comment #4
David_Rothstein CreditAttribution: David_Rothstein commentedSo it seems to me like we should roll this back, but then again at least it made the labeling consistent between CSS and JS (which as far as I know behave in an exactly parallel way).
So here is one way to fix it for both.
Comment #5
David_Rothstein CreditAttribution: David_Rothstein commentedWell, I guess with a little extra effort we can make it work for the 1% too...
I'd be happy with either of these personally, though I guess the second one is technically more correct.
Comment #6
alexpottOr how about just exposing the css.gzip and js.gzip settings? Empowering the user :)
The reason I submitted this patch.. is that we were trying to come up with consistent labelling for config data in the schema. What I actually think need to happen is css.gzip and and js.gzip need to be exposed in the interface. Some thing like this...
Comment #7
David_Rothstein CreditAttribution: David_Rothstein commentedHm, is that setting really common enough that it's worth exposing a UI for? (Also keep in mind that regardless of what those checkboxes say, compression won't happen if the zlib extension isn't available.)
By the way, it turns out that the second patch I posted above doesn't work correctly - the text never changes even if you edit the variables in settings.php. I believe that is because of #1934152: FormBase::config() and ConfigFormBase::config() work entirely differently, may result in unexpected side effects and I left a comment there.
Comment #8
Owen Barton CreditAttribution: Owen Barton commentedI agree with David - I can't think of a situation where you would want to supress gzip of css/js alone - it works reliably out of the box and sites with unique needs tend to switch out the whole subsystem (advagg style) anyway.
Comment #9
alexpottIf there really is no situation then when do we have the additional settings...
I think that the reason to suppress gzip is when you want a reverse proxy to handle the compression for your site and you don't want apache or PHP to waste time on compressing things only for varnish (or whatever) to waste CPU cycles uncompressing...
Personally I'm in favour of exposing settings through the UI to users because this is one way that people learn what Drupal can do.
Comment #10
star-szrThis form is in the process of being converted to use SystemConfigFormBase (#1925660: Convert system's system_config_form() to SystemConfigFormBase) so any followup patches here may need a reroll depending on timing.
Comment #11
star-szrAnd revising title to try and avoid some confusion. I know this isn't a long issue, but regardless of the number of comments, it's still confusing when follow-up patches are added after the issue is fixed.
Or, quoting @xjm in #680546-100: Add a custom 'number of values' for 'multiple / multi-value' field. (e.g. nodereference, imagefield):
And now back to your regularly scheduled programming :)
Comment #12
David_Rothstein CreditAttribution: David_Rothstein commentedSure, we could roll it back like I was originally thinking and then try again from scratch, but it's not really a followup. The checkboxes were wrong before and they're still wrong now :)
Or I guess now that they don't mention compression at all, you could say they're not technically wrong, just providing less information. But I think CSS/JS compression is an important technical detail to mention correctly on the performance page.
Comment #13
David_Rothstein CreditAttribution: David_Rothstein commentedComment #20
vulcanr CreditAttribution: vulcanr as a volunteer commentedActually I just ran the site again, and I think this issue is already fixed. We have 2 different Checkboxes:
- Aggregate CSS files.
- Aggregate JavaScript files.
Comment #25
vulcanr CreditAttribution: vulcanr as a volunteer commentedWill propose to review this on today's UX meeting.
Comment #26
Vidushi Mehta CreditAttribution: Vidushi Mehta at gai Technologies Pvt Ltd commentedI've also tested this issue but its fixed now.
There are two different check boxes names as:
- Aggregate CSS files
- Aggregate JavaScript files
PFA the screenshot for the same.
Comment #27
alexpottGiven this issue was committed on
Date: Sun Mar 17 00:51:13 2013 -0700
I think we should probably close this and more @David_Rothstein's concerns to a separate issue.@vulcanr did you discuss in the usability meeting?
Comment #28
vulcanr CreditAttribution: vulcanr as a volunteer commented@alexpott we didn't since back then the meeting was almost all about adopting ReactJS and another issues.
Comment #30
ifrik@vulcanr: Do you still want to raise this at a UX meeting? Or can we close this since the UI text itself is now correct anyway?
Comment #31
vulcanr CreditAttribution: vulcanr as a volunteer commentedI think that if it's correct now, this issue could be closed. I have been out from the UX meetings for a while because of schedule reasons.
Comment #32
oriol_e9g