Non-aggregated CSS external files do NOT use the library version as a query string like JS library files do. I'm not sure why this is other than it seems like an oversight. Perhaps someone can give good reasoning as to why this was left out of core.

See attached patch for 8.7.1.

Issue fork drupal-3056065

Command icon 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

erscott created an issue. See original summary.

erscott’s picture

StatusFileSize
new1.28 KB
idebr’s picture

Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 2: core-css-query-string-3056065-1.patch, failed testing. View results

Version: 8.7.1 » 8.7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Version: 8.7.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Branches prior to 8.8.x are not supported, and Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

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

rattusrattus’s picture

StatusFileSize
new1.4 KB

The patch in #7 does not apply to 8.9.x. Here's an updated patch that does.

rattusrattus’s picture

StatusFileSize
new1.24 KB

Missing a closing brace in the last patch : (

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

acbramley’s picture

Status: Needs work » Postponed (maintainer needs more info)
Issue tags: +Bug Smash Initiative

Non aggregated CSS assets use a value from state which is derived from a timestamp and updated on cache clear. There is no need to append a version parameter as far as I can see? Honestly I'm not sure if JS files need it either? Marking PMNMI in case anyone disagrees

catch’s picture

Version: 9.5.x-dev » 11.x-dev
Category: Bug report » Task
Status: Postponed (maintainer needs more info) » Active
Issue tags: +Needs tests

I think this is valid, but it's a task rather than a bug.

Using the version instead of the hashed timestamp means that if the CSS version doesn't change, it can persist in CDN/varnish/browser caches even when the Drupal cache is cleared which should result in better hit rates.

If we have tests for the js version in the query string, we should be able to adapt those for CSS straightforwardly so adding the 'needs tests' tag.

cilefen’s picture

sanket.tale made their first commit to this issue’s fork.

sanket.tale’s picture

Status: Active » Needs review

Created MR but it is failed due to the Nightwatch pipeline on `ckEditor5EditorHeightTest.js`, which is unrelated. pipeline passed for the relevant areas.
Can someone please guide me on how to proceed with resolving or working around this Nightwatch failure?

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs issue summary update

Issue summary appears incomplete.

Was previously tagged for tests which still appear to be needed.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.