Description
Preconditions and environment
- Magento community/commerce version: 2.4.7
- Firefox browser (I was able to reproduce this on other browsers, but in firefox, the issue occurs almost all the time)
Steps to reproduce
- Install fresh Magento version of 2.4.7
- Enable js minification (there are few ways to do it, I edit the config.php/env.php file)
...
'system' => [
'default' => [
'dev' => [
'template' => [
'minify_html' => '1'
],
'js' => [
'merge_files' => '0',
'minify_files' => '1',
'enable_js_bundling' => '0'
],
'css' => [
'minify_files' => '1'
],
'grid' => [
'async_indexing' => '1'
]
],
]
]
- Run:
bin/magento setup:upgrade
bin/magento deploy:mode:set production
- Now go to front and open the console, errors should be there
- If errors are not there refresh the page few times,
Best is to use Firefox, as the errors there appear almost always.
The errors appear rarely in other browsers.
The first error:
The resource from “http://magento.clean/static/version1718361386/frontend/Magento/luma/en_US/mage/common.js” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
These errors do not occur on magento 2.4.5
I did not test this on magento 2.4.6 so it may be that the issue also occurs there.
Expected result
There are no errors in console.
The files are not loaded twice.
Only minified files are loaded.
Actual result
There are errors in console.
Files are loaded twice
.min files & their corresponding 'not minified' are being requested (which fails to load as not minified files, don't exists in pub directory after setup:static-content:deploy) .
Additional information
I noticed the issue when upgrading from 2.4.4-p8 to 2.4.7 so not quite sure if this started to happen with 2.4.7 release or 2.4.6
Release note
No response
Triage and priority
- Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status