I have a webform that is causing dramas for IE and Chrome users.
Errors:
1. I'm getting DTD errors in Internet Explorer. See: http://screencast.com/t/VAPuppI75CO
2. And souuce code shows up in Chrome. See: http://screencast.com/t/CqYj2ebdhmR
I don't know why this is happening but it seems to be only happening on the Webform here: http://bit.ly/x3pQ9U
I couldn't find any issues that related to this in the Webform issue queue.
I am worried that it might be happening on other pages that I don't know about (this isn't the only webform on the site).
In the w3c Validator I see...
Conflict between Mime Type and Document Type
The document is being served with the application/rss+xml Mime Type which is not a registered media type for the Document Type. The recommended media type for this document is: application/xhtml+xmlUsing a wrong media type for a certain document type may confuse the validator and other user agents with respect to the nature of the document, and you may get some erroneous validation errors. How to fix this problem? One of the following techniques should help:
If you are serving a static file on a Web server, changing its extension should help. Use e.g .xhtml for XHTML or .mml for MathML.
You may need to reconfigure your Web server. This Setting up MIME Types tutorial has instructions for Apache, Tomcat and IIS.
If the document is generated dynamically, the scripting language should allow you to set up the mime type: this article on MIME Types and Content Negotiation has examples in PHP, Perl, and ASP.
Is it possible that Nginx is causing this conflict for me?
Comment | File | Size | Author |
---|---|---|---|
#6 | Screen shot 2012-04-14 at 8.30.44 AM.png | 83.33 KB | tribe_of_dan |
Comments
Comment #1
tribe_of_dan CreditAttribution: tribe_of_dan commentedhttps://gist.github.com/015dd294555dcffac35a
Comment #2
omega8cc CreditAttribution: omega8cc commentedIt is a bug in our Nginx configuration. We have
/feed
location with non-literal matching, so it affects *any* URL with/feed
inside, like/webform/feedback
in this case.Originally it has been introduced to fight with Boost cache served as html for cached feeds, with literal matching and forced mime type, so it shouldn't affect any URI which doesn't start with
/feed
, but it may cause more issues than it fixes, so we should remove it.Comment #3
omega8cc CreditAttribution: omega8cc commentedFixed in:
6.x-1.x http://drupalcode.org/project/provision.git/commit/56451d1
6.x-2.x http://drupalcode.org/project/provision.git/commit/0759b66
Thanks!
Comment #4
tribe_of_dan CreditAttribution: tribe_of_dan commentedGreat, thanks for your help.
Comment #6
tribe_of_dan CreditAttribution: tribe_of_dan commentedHi omega8cc, I have another problem which I suspect is from the same thing. When viewing my site from Safari, the site displays as a feed and there's no styling. I'm also getting 'you don't have java enabled' notices from hierarchical_select' module in Firefox and Chrome. (please see screenshot attached)
Is this is the same cause, will the next BOA upgrade be soon? Should I edit nginx_simple_include.conf and nginx_advanced_include.conf myself in the meantime as per your patches?
Thanks
Comment #7
tribe_of_dan CreditAttribution: tribe_of_dan commentedI tried the edits to the .conf files and believe that this isn't caused by the same issue. I thought that from the 'RSS' in the address bar that this might have been the same issue. This is might be from my recent update of Advagg module, opening issue there. (http://drupal.org/node/1532644)
Comment #8
omega8cc CreditAttribution: omega8cc commentedIt is unrelated, please read: http://omega8.cc/faq#advagg