Problem/Motivation
Gin login not updating login form as expected after drupal 10.1.0 update, form is rendered as just text with no theme.
getting errors in console:
The resource from “https://domain/user/login?destination=/sites/default/files/css/css_EwOPq...” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
login
The resource from “https://domain/user/login?destination=/sites/default/files/css/css_XHRnL...” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
login
The resource from “https://domain/user/login?destination=/sites/default/files/js/js_1HL_KtA...” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
I'm using nginx within ddev as webserver
Possibly related to https://www.drupal.org/project/drupal/issues/2854817
Comments
Comment #2
realityloop commentedComment #3
realityloop commentedComment #4
saschaeggiI don't think this problem is specific to Gin Login (works on 10.1.0 for me).
was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).You might want to check which stylesheets actually get blocked (try to deactivate aggregation to do so) and if the right MIME type is set (text/css and not text/html).
(If the stylesheets happen to be from Gin Login feel free to reopen this issue).
Cheers
Comment #5
realityloop commentedAs posted in Slack:
With aggregation disabled it's working as expected no errors in the console, as soon as I enable aggregation of either CSS or JS, the login page ends up borked. If I login via borked form the rest of the site is displaying as expected.
If I enable JS aggregation the image doesn't load but CSS does, if I enable CSS aggregation the page CSS doesn't load but the image does.
If both are aggregated neither CSS or Images load on login form.
In no case is anything recorded in drupal error log.
Comment #6
saschaeggiClosing as I still can't reproduce this.
Comment #7
finex commentedHi, I'm experiencing the same problem. I've an Nginx web server and with css aggregation on I have the following error:
Probably it could be an error on the nginx settings but I haven't found it yet.
P.S: I'm experiencing the problem on all website pages, not only on the gin login page.
Comment #8
saschaeggiWhich sounds to me that it’s not a gin_login issue. We don’t set or alter MIME types. It might be related to Drupal 10.1.x new aggregation system with nginx. So you might want to search the core issue queue for a solution.
Comment #9
finex commented@sashaeggi: indeed, I've tought the same. On the next days I'll try to understand better the situation and in case I will open a separate issue (I'll link it here for reference).
Comment #10
steffenrLooks like the error
was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).could be caused by a broken / empty src in the script tag.<script type="text/javascript" src="/"></script>tag.Same error was mentioned here: https://www.drupal.org/project/advagg/issues/3374329
Comment #11
saschaeggiClosing this issue as I'm still unable to reproduce and it was not reported any further.
Also I don't see any reason why we would define any wrong MIME type here.
If I'm wrong feel free to reopen this issue.
Cheers!