Posted by dgtlmoon on July 7, 2006 at 5:58am
Jump to:
| Project: | Javascript Tools |
| Version: | master |
| Component: | wForms |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
I've enabled wforms and jsutils, but i get this error in my javascript console.
Error: The stylesheet http://knack.staging.d2p.com.au.../node/add/modules/jstools/wforms/lib/w... was not loaded because its MIME type, "text/html", is not "text/css".
any ideas?
Comments
#1
Hmm. This may be a server issue, i.e., you need to set your server to give .css files the text/css mime type. I don't know why it would complain for this and not other stylesheets. Does the page work as expected?
#2
Hello,
I also faced the issue.
This is not a system configuration issue but it is development issue.
As most of the CMS use some configuration like generating files thorugh php.
for generating url:
http://test.drupal.org/index.php/lsjkldfjs/lsjfljs/test.html
we have the mime type test/html
but when css is generated dinamically
http://test.drupal.org/index.php/lsjkldfjs/lsjfljs/test.css
then the page index.php is not having the code to change the mime type.
For ones knowledge we can change the header of reponse. This is generally done when creating the custom images like captcha.
One can do this.
<?phpheader('Content-type: test/css');
?>
Regards,
Ankit Gupta
#3
Hello,
I am a linux SA. So may be my tendency is to put work on development side.
Thats my fault.
I thought if the css is generated through php file then we can do the above.
But after some time of the old issue I saw the issue again with a static css file so not a development issue.
It started coming as firefox is updated and now it checks very strictly that the content-type of .css should be text/css not text/html nor text/plain etc.
please add a line in your apache configuration file
AddType text/css .css
And everything will work fine.
Regards,
Ankit Gupta
#4
I found the solution on this website: http://forums.formtools.org/showthread.php?tid=1062
Essentially, you unset the default mime type in your php.ini file, as in:
default_mimetype = ""
After this, the drupal css loaded properly.
#5
hi lads, none of the above solution has solved my problem. problem is i think arising from popup menu. how do i fix it.
#6
The mime-type of the css file is returned as "text/plain" to the browser and not as "text/css". Most browsers don't care about that, but Firefox does care and ignores the css (a bit harsh). If you're using Nginx as webserver (instead of Apache), the cause will probably be in your nginx configuration.
The Nginx config file should contain a link to the default mime-types. Make sure the link isn't in comments.
http {
include /etc/nginx/mime.types;
}
OR, add this:
http {
types {
text/css css;
}
}