views:

163

answers:

1

Hey. the busted website is: www.mgxvideo.com/mgxcopy-alpha-3, and the specific error that I'm getting is the thing where IE prints out all my source code.

As far as I can tell, the error is appearing at random in IE6, 7, and 8, but it's a commonly occuring error. I'm looking for explanations, debugging tools, fixes. Anything is appreciated, because I'm fully stuck.

Here's how to reproduce:

  • Add item(s) into cart.
  • At the display cart (the url shud end with cart_display_ie.php)
  • Use the shipping calculator over and over and over again until you get the error. It's happened one the first, second, 5th, and the 17th try.
  • Reset cookies to restart from fresh

Here are some possibly relevant details

  • 1and1 hosting, php from scratch, and mysql
  • I'm using Mark Sanborn's php code to interface with UPS's servers.
  • I'm using a local DTD for xhtml transitional 1.0
  • This error also appears in the checkout cart and also seems associated with the UPS function.
  • This isn't directly relevant, but IE also plagues me with "The XML page cannot be displayed."
  • Occassionally, the "The XML page cannot be displayed" is displayed as a small canvas within the context of a source print like the error I'm printing. It'll appear near the location of the error in html source, except the canvas has a really small width and height, and not display any further source code afterwards. I've fixed all these errors; they were all caused by improper syntax or w3 rationing of DTD downloads.
  • The cart_display*.php is responsible for adding products, removing products, and calculating shipping.
  • Sometimes it's something stupid like custom settings on my computer b/c I tweak with random settings that cause side effects. But I've tested in msft's VirtualPC, and had friends reproduce the error.

Here are some resources of similar problems. I haven't tried them because--even if they work--they mean that the website doesn't work at typical/default settings.

Like I said: any explanations, tools, guesses, or fixes are fully appreciated. I'm trying to finalize the site so I can present it as a beta within the week, and I'm fully stuck. Also, is there a workaround (like a tag) that can hide this error from the user?

+4  A: 

I grabbed a network capture of the repro using Fiddler (www.fiddler2.com).

It looks like you're sending an HTML comment containing a webservice result before the HTML body. It further looks like IE is subsequently sniffing this as an XML body instead of a HTML response.

It appears that if you move your HTML comment inside your HTML tag, the problem goes away.

Note that you should confirm changes in a new browser tab. Once IE is on an XML page, simply hitting F5/Refresh isn't necessarily going to show you the HTML content properly due to caching of the MIME-type decision.

EricLaw -MSFT-
Hey EricLaw. Thanks, I didn't think of using Fiddler. I understand what you're saying, but am unable to reproduce with fiddler. Here it is:<!-- HTTP/1.1 100 ContinueHTTP/1.1 200 OKDate: Mon, 29 Jun 2009 23:53:02 GMTServer: ApacheThe character u mentioned is < and not in the format "<". Am I doing it wrong? In fiddler, I: reproduced the error. All correct runs were blue, and had one entry. The error was black, and included 4 additional files (*.dtd, *.ent). Then, in the "Inspectors" tab and "TextView" subtab, I c/p'ed exactly what I saw. Any thoughts? Thanks again dude.
montooner
Sorry-- I edited my response after I figured out what was going on. Try moving the HTML comment (the <!--HTTP/1.1 --> bit) inside the <HTML><HEAD> tag. This should allow IE to properly recognize this as an HTML file and not try to throw it into the XML MIME Viewer.
EricLaw -MSFT-
Got it. I realized that was a nonessential piece of code (it was the UPS xml response, being printed out in php scripting I did the preceded the <html> tag. @EricLaw, you're a lifesaver.
montooner