IE printing out source code at random (seems very nondeterministic) - html

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.
http://www.techsupportforum.com/microsoft-support/internet-explorer-forum/168285-ie7-problem-printing-html-xml-source-rendering.html
http://www.computing.net/answers/windows-xp/ie6-printing-problem/160128.html
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?

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.

To resolve this issue, you need to re-register two dlls.
Open a elevated command prompt and type following commands
regsvr32 /i mshtml.dll
regsvr32 /i shdocvw.dll
For detailed fix steps, visit http://geekzsupport.com/internet-explorer-prints-html-source-code/

Related

Display WebSocket message with formatting?

UPDATE: At time of asking this question, this was related to SignalR library and not plain WebSockets. I see correctly formatted messages now.
Is there any way to word-wrap messages in WS tab in Chrome Developer Tools or display JSON with formatting ? It's really annoying to scroll to right to see whole message.
Example with message selected and it's preview doesn't have any formatting or word wrapping applied:
Thank you in advance.
It's working fine here on Chrome/78.0.3904.97:
What I did:
Go to http://crawl.develz.org/play.htm
Open one of the listed servers
Start devtools
Go to the Application tab and add a cookie called "no-compression" with value "yeah no" to the relevant server. (Any truthy string should work, I just chose the least confusing one I could think of in about a minute.)
Otherwise, crawl's webtiles server can end up compressing messages even when browser supports RFC 7692's "permessage-deflate" extension, which ruins the demonstration.
Open the Network tab
Reload the page
Select the "socket" request, switch to the "Messages" tab, and pick a frame.
Start drilling down in the tree view in the bottom pane!

How to enable Code Completion Auto pop-up in WebStorm?

I've been trying to get Code Completion to work on the current version of WebStorm (2017.3), but to no avail.
Specifically when working with HTML code completion seems to only work when I press the shortcut ctrl+space. As far as I can tell I should be able to get the Code Completion look up table to pop-up automatically when I start typing by going to Preferences > Editor > General > Code Completion and checking the box for Autopopup code completion the thing is... I DON'T SEE THAT BOX!!!
This is driving me insane. I've looked under Code Completion in WebStorm 2017.3 Help and there are discrepancies between what the instructions say I should see, and what I actually see.
This is a picture of my Code Completion window in WebStorm 2017.3:
but it should look more like this (IntelliJ IDE 2017.3):
The Basic Completion box is missing in WebStorm. Not sure if that has something to do with it.
I've looked around and it seems like other people's Code Completion window looks like it's supposed to. For example in this Community Forum there is a post in 2015 and another in 2016 where the users show their Code Completion preferences and they look like they're supposed to.
I've tried re-installing WebStorm, deleting all preferences and the .plist but it hasn't worked.
I would like to note, that this issue seems to be affecting only my HTML documents, since the Autocomplete pop-up table for JavaScript works well.
Any ideas on what might be going on? Is there something on my end I can do to fix this?
In short: it works as intended.
Thing is: it's HTML context ... where everything is a plain text with HTML tags inside (despite the fact that whole HTML document starts with <html> tag and stuff).
In this regard HTML context is not that strict/obvious as JavaScript/PHP/etc is. There is no way to guess if you are trying to write a word strong or a HTML tag <strong> .. hence you see no completion popup when you just typing any word. But .. if you type < before starting typing strong it will be a hint for IDE that you are typing a HTML tag (which means HTML context)... and completion popup will appear as usual (no need to invoke it manually).
If it would work as you are expecting/proposing (having completion popup for each word) then I would see it for every word in Any ideas on what might be going on? sentence. It will be supper annoying to see that popup appearing/disappearing for no reason for each word (when I'm clearly typing a plain text). Some people get mad even for much smaller things (like highlighting a matching brace or tag when you move caret left/right)...
Related subject: https://intellij-support.jetbrains.com/hc/en-us/community/posts/115000719050-Autopopup-completion-works-inside-php-tag-but-doesn-t-work-outside-of-it-Is-there-any-fix-
If typing < is a problem (not convenient or any other "religious" reasons (e.g. "why should I type it -- IDE should do that for me" etc)) -- consider speed up even more with Emmet (IDE supports basic abbreviations as well as expanding sequences) or Live Templates (basic Emmet abbreviations are handled with Live Template under the hood anyway).
https://www.jetbrains.com/help/webstorm/emmet.html
https://www.jetbrains.com/help/webstorm/live-templates.html

Unknown characters on TYPO3 tx_news list view (in Chrome)

I noticed strange behaviour on TYPO3 tx_news list view. Sometimes on the bottom of the page appears unknown characters. I don't know how and why and it's only on one (list view) page and in chrome browser. Here is the screen shot of that:
I have noticed that I can call out that behaviour when I change some tx_news configuration in Extension Manager eg. "List actions shown in Flexforms"
Any suggestion what is wrong?
[EDIT:] After turn off OpCache - problem doesn't occur. Could it be related?
You best bet is to install XDebug and call your page with ?XDEBUG_TRACE=1
You can then search for the offending pattern in your trace file and find the very first place where this offending pattern occurs (if it's not random of course). This gives you the very best chance to figure out why it appeared at all.

Mailto link causes Chrome to crash

I am developing an application for an environment where Chrome Version 29.0.1547.62 is used.
As part of the application, there is a requirement for a mailto: link. When this link is clicked, MS Outlook opens with the provided information in a new message.
In general this works as expected, however the following string causes Chrome (including all other Chrome windows) to crash with a message that begins with 'Whoa!'
> mailto:xxxxxxxxxx#xxxxxxxxxx.xxx?body=xxxxxxx%0A%0Axxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> %0A%0Axxxxxxxxxxxx x xxxxxxxxxxxxx%0A xxxx%0A xxxx%0A xxxx%0A xxxx%0A
> xxxx%0A%0A xxxxxxx xxx
I have obviously removed all personal information, but the structure is otherwise the same. The issue can be replicated by pasting the link into the omnibox.
Removing one of the x's from the end will cause it to work correctly, making it appear to be a length issue, however simply having a longer body made solely of x's doesn't cause an issue.
My question is:
Has this issue been specifically resolved in a later version of Chrome? If so, then a simple ($.browser.chrome && $.browser.version == 29) check would be sufficient, but if it has not, then I will have more of a problem.
Unfortunately the common fix for adding the GMail handler is not appropriate here, and it is also not possible to add any command line arguments to Chrome on start up, limiting the amount of debug information I can provide.

IE8 claims my page has an error, firefox doesn't, and I can't find any error. Help!

This is something of a follow-up question to my question here. You can find the HTML source in a text file here.
When I load that page in IE8, I get the "Done, but with errors on page." message in my status bar. The detail view shows
Expected identifier
sms Line: 147
Code: 0 Char: 67
and I see absolutely no problems anywhere near there. In IE8, the page is still behaving erratically w/r/t the randomly losing focus as mentioned in my other question.
When I load the same exact page in Firefox (using Firebug) the console shows no errors and the page works perfectly. Any thoughts on what's going on here? This is driving me nuts and making me want to give up on even trying to write an IE friendly page.
Edit: Thanks for all the comments! This page is written as a JSP, so I edit in Eclipse. I found an Eclipse warning about the onblur event for the username field. I switched it from
onblur="alert(document.activeElement + ' class:' + document.activeElement.class)"
to
onblur="alert(document.activeElement)"
and that made the bizarre IE page error vanish. I had been trying to give more info (namely, its CSS class) about specifically which element is stealing focus - to my own detriment, apparently, since Javascript was interpreting the '.class' part in the Java(script) sense there is no class property (I should have been using className).
And, no, the page doesn't validate. But the errors were mostly/all ones that just didn't make sense to me, such as
Line 14, Column 41: Attribute "LANGUAGE" is not a valid attribute. Did you mean "language"?
But I'm still stuck trying to figure out why, as I enter text in the username & password fields, focus randomly switches to a div (working on figuring out which div currently).
Edit 2: It's the div between the two "global nav" comments, at the very top of the body. Still no idea why it's happening, though.
The problem appears to be the line
onBlur="alert(document.activeElement + ' class:' + document.activeElement.class)"
when you take off the ".class" it loads without issue. Are you sure ".class" is valid?
Does your HTML validate?
I agree, IE does a terrible job giving developers information about page errors. I only support IE on the principle that users shouldn't have to download twenty-odd browsers to go to their favorite websites. Web developers have a responsibility to make it "just work". Browser developers have a responsibility to communicate with each other and conform to standards.
Run your javascript through JSLint. You probably have a missing semicolon somewhere or a comma at the end of an object property that shouldn't be there. Firefox is more forgiving than IE when it comes to those types of syntax errors.
Edit: The inline js in your page seems to be OK. Check the contents of qm_scripts.js.
When I remove the .class from document.activeElement.class the error goes away.
The real issue is that you need to be able to debug your JS in IE 8, correct? There is a tool for that! :)