Error when loading CSS file due to MIME type "text/html"

Permalink
When I am loading a page on my site, I get the following error message in the error console:

"The stylesheet am_style.css was not loaded because its MIME type,
"text/html", is not "text/css"."

Not sure at this point why. I have other CSS files that are being loaed without issue and this one is not of type "text/html" but type "text/css" in the reference in view.php.

Has someone come across this issue and been able to resolve?

BTW, on the page, the accordion menu which this is the stylesheet for is loaded and the menu has the correct style or it at least appears to.

 
tallacman replied on at Permalink Reply
tallacman
I've noticed this before too but things look fine so I ignore it.
cfh replied on at Permalink Reply
Before i formatted my computer, everything was fine. But now, i after i re-install apache, php and mysql; i took this error message and nothing is fine in my concrete project because of this css file error.
cfh replied on at Permalink Reply
Anyone finds any solution for this problem?

(because this problem arises only in my previous concrete project, when i install a new concrete project in my apache server, i don't get any error messages abous css files. So i think, the problem is not related to my apache, php, mysql configuration)
GavMurphy replied on at Permalink Reply
GavMurphy
I'm having this problem, too.

Looks like the header_required.php is adding the following:

<link rel="stylesheet" type="text/css" href="/blocks/slideshow/view.css?v=946832cdaa77e8dd6c86946b87415b60" />


rather than the path starting "/concrete/blocks/slideshow/......"

It's always good to remove errors or missing files so I think someone should look into this.
katalysis replied on at Permalink Reply
katalysis
I had this problem too on a couple of the C5 sites we run.

It seems to relate to Concrete supplying the wrong URL for a css file in the header. When the file is then found to be missing an html/text document is returned which the browser correctly sees as the wrong mime type.

In our case the url

/blocks/page_list/view.css

was given by concrete instead of

/concrete/blocks/page_list/view.css

Our quick fix was to copy the view.css file from the concrete/blocks/page_list directory and put it in blocks/page_list.

Hope this helps. Glyn.
cfh replied on at Permalink Reply
I resolved the problem with a long way...

I installed a new "concrete" then i copy-pasted all the installed blocks, themes to the new install. Then i connected the previous db to new install, in mysql server.

The problem is resolved...