Problem/Motivation
I am getting issue after upgrade Drupal 10.1.1 .
Refused to execute script from
'files/js/js_yvkkgN0iKZ30AdwlfXvVMCtPnsFwBKc9nQ8FkcPYRzY.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Its working fine if disable advagg Module
Steps to reproduce
Upgrade Drupal 9.5.8 to 10.1.1
advagg : 6.0.0-alpha1
PHP 8.1.12
Comments
Comment #2
ashutosh.mishra commentedComment #3
ashutosh.mishra commentedComment #4
amitvin commentedCheck if you have Xdebug enabled. If yes then try disabling it.
https://www.drupal.org/project/drupal/issues/3371010
Comment #5
yevko commentedI am getting the same errors. I found out that it is not the disabling of the Advanced aggregation, but disabling of Aggregate CSS files and
Aggregate JavaScript files what leads to the site getting up again.
This is happening in the server, no Xdebug
Comment #6
dpagini commentedI have also encountered this error (or similar) a few times on my production site. I haven't been able to determine if it's related to this module, though, but I am using this module, still on Drupal 9.
On my site, however, I am seeing that Drupal is loading a script at
<script type="text/javascript" src="/"></script>(the homepage).Comment #7
klemendev commentedPossible duplicate/related to https://www.drupal.org/project/advagg/issues/3308099. Seems at the time of writing advagg is not suitable for use with Drupal 10.1.x+. We are waiting for maintainers to make a plan forward with this module, but for now it may be better to use core aggregation and compression features
Comment #8
capellicThanks @YevKo, this helped me:
Comment #9
la vague illuminee commentedWe had the same issue on one of our website.
The issue is the variable in system.performance is deprecated, and was deleted by D9 -> D10 migration.
During the cron, AdvAgg tries to delete files modified after this value.
Since it's now empty, it means 0, so files are deleted immediatly.
In the cache, file is still mark as active, drupal tries to load it, but it results in a "404 - not found"
We managed to solve this issue by re submiting AdvAgg settings form which sets back the stale_file_threshold value.
I thins a better approch would be to patch the module with the patch present in this issue: https://www.drupal.org/project/advagg/issues/3410820
Regards !