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.
Problem/Motivation
There seems to be a small logic error in this class, the $optimize_js variable can become TRUE only when the site is in maintenance mode
// Aggregate CSS/JS if necessary, but only during normal site operation.
$optimize_css = !$maintenance_mode && $this->config->get('css.preprocess');
$optimize_js = $maintenance_mode && $this->config->get('js.preprocess');
Steps to reproduce
Proposed resolution
* Fix the variable assignment to include the missing exclamation mark.
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
Issue fork drupal-3439946
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
nevahen CreditAttribution: nevahen commentedComment #4
smustgrave CreditAttribution: smustgrave at Mobomo commentedThank you for reporting but can you provide steps to reproduce?
This may also require test to show the problem.
Comment #5
nevahen CreditAttribution: nevahen commentedThis is something I noticed while I was debugging something else.
A small piece of the diff From this issue https://www.drupal.org/project/drupal/issues/3373328 shows possible typo / missing ! on the $optimize_js part
I guess one could check cache keys during ajax request, as the AssetResolver won't generate "1" as last character due the current implementation - I'll check later if I can do some simple steps if they are needed.