Generated CSS file being deleted immediately after being created

Created on 3 August 2023, over 1 year ago
Updated 16 August 2024, 3 months ago

Problem/Motivation

The generated CSS file is being deleted immediately after being created. I believe this was caused by this commit which replaced code that would delete only stale generated files with code that deletes all files.

Steps to reproduce

On line 164 of the simple_menu_icons.module file place a die; statement, check the sites/default/files/css folder to ensure the generated file is there, remove the die statement and refresh, confirm that the file is no longer present.

Proposed resolution

Replace \Drupal::service('asset.css.collection_optimizer')->deleteAll(); with \Drupal::state()->delete('drupal_css_cache_files'); on line 165 of simple_menu_icons.module.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

RTBC

Version

3.0

Component

Code

Created by

🇺🇸United States rromore

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024