T3 version 3.2.0
t3_bs3_blank version 3.1.0
Joomla version 4.4.2

Chrome browser error:
Refused to apply style from 'https://www.sitename.com/templates/system/css/system.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

The templates/system/css folder no longer exists.

Similar issue reported here: https://www.joomlart.com/forums/d/44488-joomla-4-refused-to-apply-style-from-templatessystemcsssystemcss .

Can you provide a solution?

Thank you.

Hi

You can open this file: /templates/t3_bs3_blank/tpls/blocks/head.php

Look for this code:

<?php
// SYSTEM CSS
$this->addStyleSheet(JUri::base(true) . '/templates/system/css/system.css');
?>

change it to:

<?php
if (version_compare(JVERSION, '4.0', 'lt')) {
// SYSTEM CSS
$this->addStyleSheet(JURI::base(true) . '/templates/system/css/system.css');
}
?>
a month later

Hi, I have the same problem but this solution doesn't work for me.
I'm using JA Morgan and all is updated today to the latest versions. (J4, template, components etc)

The message is:
Refused to apply style from 'https://www.mysite.it/templates/system/css/system.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

I tried your solution but I don't have this file path /templates/t3_bs3_blank/tpls/blocks/head.php
I changed instead the file in this path /templates/ja_morgan/tpls/blocks/head.php
But nothing happens and the error is still there.

Can you help me?

    cyskye With JA Morgan, you can change the file:

    /templates/ja_morgan/tpls/blocks/head.php

    or this one:
    /templates/ja_morgan/local/tpls/blocks/head.php

    then clear cache.

    If it still doesn't work, you can share me the URL + super admin account so I can take a look.

    Thank you.
    Yesterday I changed /templates/ja_morgan/tpls/blocks/head.php and it didn't work, but now error has disappeared, so maybe it was a cache problem. It seems to work, thank you.

    For the second solution, I don't have the folder /templates/ja_morgan/local/tpls(NO)/blocks(NO)/head.php(NO)

      cyskye You can create that path: /templates/ja_morgan/local/tpls/blocks/

      and copy the edited file: /templates/ja_morgan/tpls/blocks/head.php + paste into above path. It will help to save your change when updating new version of template.

      Hello.

      My site does not have a /templates/system/css folder.
      It does not have a system.css file.

      I deleted the line from /local/tpls/block/head.php.

      Thanks.

        dsinor If you're using Joomla 4.x and above, no need to load that file 🙂

        Write a Reply...
        You need to Login to view replies.