The files are loaded as so:

$document = JFactory::getDocument();

Some work that way, but these two in particular don't. Are there any variables I can add to my addStyleSheet or addScript to make it work?


This most likely means that you are adding non-existing assets. Their links generate a 404 page which is why you're getting the text/html MIME type instead of respective types for CSS/JS files.

  • This is my suspicion as well. – mickmackusa Oct 30 at 8:41
  • It seems to me that all of the mismatched items are missing .css from the end of the file name. – Eoin Nov 21 at 15:43
  • Yup, a typo. Thank you. – Eoin Nov 22 at 22:45
  • @Sharky Thank you for correcting me. In this case you were right. Take care. Have a great weekend. – alexandreelise Nov 23 at 5:35

This kind of error comes from what is known as CSP (Content Security Policy) configured on your web server. If you don't know what it is. Please contact your hosting provider. For any information you can read this article on MDN (Mozilla Developer Network)

Take care. Hope it helps.

  • This will be Admin Tools then which is setting this policy I think. Thank you. – Eoin Oct 29 at 23:03
  • @Eoin Glad to help. Have a nice day. – alexandreelise Oct 29 at 23:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.