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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andymartha’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
26.75 KB
27.5 KB

I 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.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Nice catch. :)

Committed and pushed to 8.x. Thanks!

David_Rothstein’s picture

Status: Fixed » Needs work

I 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% :)

David_Rothstein’s picture

Title: CSS Performance setting checkbox description wrong » CSS and JS Performance setting checkbox descriptions are wrong
Status: Needs work » Needs review
FileSize
877 bytes

So 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.

David_Rothstein’s picture

Well, 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.

alexpott’s picture

Or 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...

David_Rothstein’s picture

Hm, 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.

Owen Barton’s picture

I 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.

alexpott’s picture

If 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.

star-szr’s picture

This 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.

star-szr’s picture

Title: CSS and JS Performance setting checkbox descriptions are wrong » [Followup] CSS and JS Performance setting checkbox descriptions are wrong

And 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):

We really shouldn't reopen issues for non-rollbacks.

And now back to your regularly scheduled programming :)

David_Rothstein’s picture

Title: [Followup] CSS and JS Performance setting checkbox descriptions are wrong » CSS and JS Performance setting checkbox descriptions are wrong

Sure, 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.

David_Rothstein’s picture

Title: CSS and JS Performance setting checkbox descriptions are wrong » Performance page provides incorrect/incomplete information about CSS and JS compression

Status: Needs review » Needs work

The last submitted patch, 6: 1926228.css_gz_gzip_admin.6.patch, failed testing.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

  • webchick committed 294bfb6 on 8.3.x
    Issue #1926228 by alexpott: Fixed CSS Performance setting checkbox...

  • webchick committed 294bfb6 on 8.3.x
    Issue #1926228 by alexpott: Fixed CSS Performance setting checkbox...

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

vulcanr’s picture

Issue summary: View changes
Status: Needs work » Needs review

Actually 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.

  • webchick committed 294bfb6 on 8.4.x
    Issue #1926228 by alexpott: Fixed CSS Performance setting checkbox...

  • webchick committed 294bfb6 on 8.4.x
    Issue #1926228 by alexpott: Fixed CSS Performance setting checkbox...

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

vulcanr’s picture

Will propose to review this on today's UX meeting.

Vidushi Mehta’s picture

FileSize
64.54 KB

I'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.

alexpott’s picture

Given 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?

vulcanr’s picture

@alexpott we didn't since back then the meeting was almost all about adopting ReactJS and another issues.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

ifrik’s picture

@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?

vulcanr’s picture

I 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.

oriol_e9g’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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