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+xml

Using 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?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tribe_of_dan’s picture

omega8cc’s picture

Title: Conflict between Mime Type and Document Type » Conflict between Mime Type and Document Type in Nginx
Project: Barracuda » Provision
Version: » 6.x-1.x-dev
Component: Miscellaneous » Code
Assigned: Unassigned » omega8cc
Category: support » bug

It 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.

omega8cc’s picture

tribe_of_dan’s picture

Great, thanks for your help.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

tribe_of_dan’s picture

Priority: Normal » Major
Status: Closed (fixed) » Active
FileSize
83.33 KB

Hi 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

tribe_of_dan’s picture

Priority: Major » Normal
Status: Active » Fixed

I 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)

omega8cc’s picture

Status: Fixed » Closed (fixed)

It is unrelated, please read: http://omega8.cc/faq#advagg

  • Commit 56451d1 on dev-drupal-8, dev-nginx-6.x-1.x, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x by omega8cc:
    Issue #1505370 by tribe_of_dan - Conflict between Mime Type and Document...
  • Commit 0759b66 on dev-nginx-6.x-2.x, dev-ssl-ip-allocation-refactor, dev-1205458-move_sites_out_of_platforms, 7.x-3.x, dev-subdir-multiserver, 6.x-2.x-backports, dev-helmo-3.x by omega8cc:
    Issue #1505370 by tribe_of_dan - Conflict between Mime Type and Document...