10.1 - when "Aggregate CSS files" is checked new CSS is not loaded and is missing from sites/default/files/css

Created on 28 June 2023, over 1 year ago
Updated 30 June 2023, over 1 year ago

I have seen this so far on two of my unrelated 10.1 sites.

My theme's CSS loads correctly.

Then I add some new CSS and clear cache multiple times

The new CSS does not load.

At /admin/config/development/performance I uncheck "Aggregate CSS files"

Now the new CSS loads correctly.

I check "Aggregate CSS files" .

Now the new CSS does not load.

I deleted the directory /sites/default/files/css

A new css directory is created after page views but it is the same issue.

The "last modified" times on the css files in /sites/default/files/css are correct ie the CSS files in /sites/default/files/css are updating but when I search the css files for my new CSS it is not there.

Any ideas please?

πŸ› Bug report
Status

Closed: duplicate

Version

10.1 ✨

Component
Asset libraryΒ  β†’

Last updated about 18 hours ago

No maintainer
Created by

πŸ‡¬πŸ‡§United Kingdom juc1

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @juc1
  • Can you please look at the browser console log for errors and post them here?

  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Do you use nginx? There were notes in the release notes about this if so.

    Also adding a related issue

  • πŸ‡¬πŸ‡·Greece gbotis

    I have the exact same issue on a D10.1 installation. When aggregate css is checked, no new aggregated css files are created if existing (sites/default/files/css) are not deleted.

    For example updating header css ends up in having pages previously browsed with the old style and pages browsed for the first time using the updated style.

  • πŸ‡¬πŸ‡§United Kingdom juc1

    Thanks for replies. Yes I am using nginx so it looks like the related issue mentioned by larowlan

    My hack for now is that if I add new css to an existing file eg nav.css then the new css is ignored but if I rename the file such as newnav.css (and add this new file to mytheme.libraries.yml ) then the new css loads correctly.

  • Status changed to Postponed: needs info over 1 year ago
  • @gbotis Are you using nginx?

  • πŸ‡¬πŸ‡§United Kingdom juc1

    @cilefen I meant to say there are no errors in the console

    And I have now seen the same issue on a third 10.1 site.

  • Can anyone using nginx verify that the release notes information about adjusting the nginx configuration are accurate?

  • πŸ‡ΊπŸ‡ΈUnited States agarzola

    Our team ran into this issue earlier this week. Drupal was serving stale aggregated assets on a large multisite project serving ~20 sites, each with its own theme. After finding πŸ› Ensure that edge caches are busted on deployments for css/js aggregates Fixed , we decided to update the THEME.libraries.yml file in each site’s theme to either add or change the value of version for the libraries that have been updated since we updated the project to Drupal 10.1. This caused Drupal to serve updated aggregated assets and all sites now receive the expected styles in production.

  • Status changed to Closed: duplicate over 1 year ago
  • Alright this seems a duplicate issue.

  • πŸ‡¬πŸ‡·Greece gbotis

    @cilefen No I am not using nginx

Production build 0.71.5 2024