Dialog library causing Drupal CSS aggregation to link to non-existent CSS file
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3552735. --> Reported by: [tanner.svg](https://www.drupal.org/user/3510694) Related to !68 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>When Core's CSS aggregation is enabled, Drupal attempts to combine CSS files but fails when processing the <code>gin/dialog</code> library, creating broken aggregate files with missing references. This manifests as:</p> <ul> <li>Missing aggregated CSS files (e.g., <code>css_WoF7WDetc.css</code>)</li> <li>404 errors in the browser console for non-existent CSS files</li> <li>Broken or missing styles for authenticated users only (anonymous users unaffected)</li> </ul> <p><strong>Error looks like:</strong></p> <pre>Refused to apply style from 'https://test.lndo.site/sites/default/files/css/css_WoF7WD96Du1YbxRdmtucRgfNlBjte-WwTrSHdIgmY1A.css?delta=6&amp;language=en&amp;theme=gnwt&amp;include=eJx1UltyxCAMuxCE2RMxBtzEUwKMDdumpy95t9PuB8GSlSArQJgp2ZpzdMBWENhPZt8U_Oqtu5gDDeRzUn1V_KwNogncCsThZvSh7CJG4_NccsJUZRjTR9UaInLVDlLCV5I3whhe9AqMqCeE0N8OIJPLwOE0pwI-sVtan5cNDFQzEzwei_lR60iOgReF6Umc09wPsZQCeeiSc6x_m2qkZPqyDgQvMPUPf_UUIJ7JqdWyWUVW6hJRDiLnKpWh7DDlgPatxXjCmrVAOsSF0dYJZ9ygvUe-KrtGokbOrVw5FGAY-wmTnIPczNBSaS6STBgUo2sUg_XgJ7TgPYqYg9QbqXfyipNR-h8RenZf4GK3TrEim5vXG68ke-pZzD1zsJHSu5i_1LDPJotUnLeoVBO84l_r7cbJN425DAw' because its MIME type ('text/plain') is not a supported stylesheet MIME type, and strict MIME checking is enabled.</pre><p>I've narrowed this down to the following line:</p> <p><a href="https://git.drupalcode.org/project/gin_toolbar/-/blob/3.0.x/gin_toolbar.module?ref_type=heads#L411">https://git.drupalcode.org/project/gin_toolbar/-/blob/3.0.x/gin_toolbar.module?ref_type=heads#L411</a></p> <p>Commenting out the <code>gin_toolbar_css_alter</code> results in clearing the error.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <ol> <li>Install and enable the Gin admin toolbar.</li> <li>Enable CSS aggregation under <em>Configuration &rarr; Development &rarr; Performance</em>.</li> <li>Log in as an authenticated user and visit a front-end page that includes admin toolbar or Gin dialog assets.</li> <li>Open browser DevTools &rarr; Console/Network tab.</li> <li>Observe 404 errors for aggregated CSS files (e.g., <code>Invalid filename</code> responses or <code>Refused to apply style</code> MIME errors).</li> </ol>
issue