Drupal Fix for Internet Explorer Cannot open the internet site with embeded Youtube and Google Video

Author:

phil

Created:

2008/01/27 - 15:01

Last Updated:

2009/05/30 - 01:35

Drupal is a wonderful CMS platform for building an encompassing and professional website presence. I have however, run into an issue where Drupal does not like to show embeded video's through Youtube or Google Video when viewing a page in Internet Explorer. If you try to visit the page with the embeded YouTube or Google Video, Internet Explorer throws up an error message to the effect of:

Internet Explorer Cannot open the internet site http://domain.com/page

Operation Aborted.

You are then redirected to a page cannot be displayed error.

After running across this article: http://www.dogster.com/forums/Tips_Tricks_and_Help_On_Dogstercom/thread/482204
I found that the W3C is trying to do away with the <embed> tag and replace it with the <object> tag. Both Internet Explorer 7 and IE6 have a known bug where they do not like seeing the two together which is how YouTube gives the code for you to put on your website. Google Video, last I checked, provides the code as <embed></embed> But that doesn't mean it won't change. Just take note on what the embedded code is from Google.

So, to fix the problem, just remove anything related to the <object> tag.

Let's take a look at an example of the simple fix.

This is the unaltered code from YouTube:

<object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/0Q2aPi9ZEgs&rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/0Q2aPi9ZEgs&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object>

Notice the <embed> tag is within the <object> tag. Simply remove anything related to the <object> tag, like so:

<embed src="http://www.youtube.com/v/0Q2aPi9ZEgs&rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed>

That's It! You should no longer receive the error message when viewing in IE!



Post Comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.

Comments