CSS/JS aggregation broken on clean installation

Created on 7 August 2023, over 1 year ago

Problem/Motivation

A clean installation of Drupal 10.1 does not create CSS/JS cache files, but does reference them. This leads to a broken site when caching is enabled. This does not happen on a clean installation of Drupal 10.0.0.

Steps to reproduce

Installation:

composer create-project drupal/recommended-project drupal
cd drupal
composer require drush/drush

Open web interface and do a standard installation. Everything works correctly during installation.

Issue: At the end of the installation, the site loads with a broken interface.

Why: The cache is enabled by default but does not work. Aggregate CSS and JS files are referenced that doe not exist. The sites/default/files/css and sites/default/files/js folders do not exist. Any referenced CSS or JSS file are never created.

Testing: Clearing the caches either through the web interface or with Drush does not resolve the issue. The cache folders and files are never created. Manually creating the cache folders does not resolve the issue either. Files are still never created.

Workaround: Disable the CSS and JS aggregation under Config -> Development -> Performance

Note, doing the exact same installation, but using version 10.0.0 works perfectly. It's only 10.1.0 that seems broken.

Server info:
OS: FreeBSD 13.2
PHP: 8.2.8
Web: Nginx
App server: uWSGI

Proposed resolution

Create proper cache directories and aggregate CSS/JS cache files.

πŸ’¬ Support request
Status

Closed: works as designed

Version

10.1 ✨

Component
CacheΒ  β†’

Last updated 1 day ago

Created by

πŸ‡ΊπŸ‡ΈUnited States reufhaadfe

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

Comments & Activities

  • Issue created by @reufhaadfe
  • πŸ‡ΊπŸ‡ΈUnited States reufhaadfe
  • πŸ‡ΊπŸ‡ΈUnited States reufhaadfe
  • Status changed to Postponed: needs info over 1 year ago
  • πŸ‡¦πŸ‡ΊAustralia larowlan πŸ‡¦πŸ‡ΊπŸ.au GMT+10

    Please check the 10.1 release notes as there was important information for nginx users

  • Status changed to Closed: works as designed over 1 year ago
  • πŸ‡ΊπŸ‡ΈUnited States reufhaadfe

    Pebkac confirmed. Sorry for the noise.

  • Hi all. I'm sorry for re-opening up this issue, but I have the exact same problem with a fresh install of Drupal 11.0.1 (also had the trouble with a fresh install of Drupal 10.2 or something months ago). Sadly my first comment on community will be about complaining. xd

    Steps to reproduce
    - install required libraries and languages (for me, php 8.3)
    - set up a standard Drupal install (composer create-project drupal/recommended-project dirname, follow, pick standard profile).

    This is imho not an acceptable behaviour to keep...
    Considering that a fresh install with a quick "php built-in server" is one common way for newcomers to try and discover Drupal.
    Plus for a dozen years the sensible configuration was enough for a spin to be properly working (per curiosity I just made a composer install of a 9.5, besides some deprecation notices, website displayed fine without any modification with a php -S builtin server).

    And I actually experienced this precisely the last time I tried as I wanted to make a bit of show-off to a colleague to try and make it adopt Drupal 10 for a website (while using that chance to discover everything that changed since Drupal 8). Useless to say the "demo effect" hit me full face. :)

    Before this gets addressed mainstream, would anyone be kind enough to give me some hints on how to resolve manually?
    I've been using Drupal from time to time but my last in-depth experience with it was a good 4 years ago, and I'm, let's say, "more than rusty".
    This may be related, or not, to this other thread I read (of which I tried the most simple "fix suggestions" using solely interface, to no avail): https://www.drupal.org/project/drupal/issues/3381293 πŸ› Aggregation not working css and js cache directories not being created Active .
    In any case, this should be imo considered at least "important" since it's probably a trivial thing for technical / savvy Drupal users to overcome, but a potential immediate showstopper for "mostly non-technical except a few tidbits" people such as myself.

    Thanks in advance for reading the feedback and possibly giving some lead.

    Best regards,

Production build 0.71.5 2024