DmitryBaranovskiy / raphael

JavaScript Vector Library
https://dmitrybaranovskiy.github.io/raphael/
MIT License
11.27k stars 1.67k forks source link

IE7: window.Raphael.svg is null or not an object #467

Closed danyalejandro closed 11 years ago

danyalejandro commented 12 years ago

When I try to use any of the demos in http://raphaeljs.com , IE7 gets an alert message saying "Real time error. Would you like to debug it? Line 3407 Error: 'window.Raphael.svg' is null or not an object"

When I click "No", another alert appears saying "'Raphael' is undefined". Then no javascript works at all.

This happens in all the pages that try to use Raphael, including the official demos.

My current system configuration is: Windows XP Service Pack 3 installed trough an unattended package. Internet Explorer 7.0.5730.13

This error persists on different hardware (with the same windows an IE7).

The code involved in the Raphael.js library is the svg module start:

// └─────────────────────────────────────────────────────────────────────┘ \ window.Raphael.svg && function (R) {

dividedby0 commented 12 years ago

Same with IE6/8. But in my case 7 continues to work, and two other - not.

yolk commented 12 years ago

Some of our customers have the exact same problem in IE7 on XP. Couldn't reproduce it by myself.

Any chance, you'll have an look at it?

danyalejandro commented 12 years ago

Seems like this problem happens on modified editions of Windows where Active X related components have been removed or disabled. Clean installations of XP (in my case) worked all right, or manually re-installing such components (not for the average user).

Is there some way for raphael to "detect" when IE is "capable" of working the desired way? at least an error msgbox would do...

PaRoxUs commented 12 years ago

I got the same issue with IE8 on Windows Server 2008!

johnthethird commented 12 years ago

This happens when running IE8 when the site you are accessing is not in the trusted sites list. If you add the site to the Trusted Sites zone the error goes away.

mlangenberg commented 12 years ago

This also happens on Android 2.x, the exact error is TypeError: Result of expression 'window.Raphael' [undefined] is not an object.

Although Raphael does not support Android 2.x (missing SVG support), loading the JS should not throw an error.

ghost commented 11 years ago

I had the same issue yesterday while working with Raphael in IE. I did download Raphael.js from raphaeljs.com but it looks like the fix for issue #467 was not added to the latest code. I did update the fix that was mentioned in issue number 467 locally and the code worked fine without any issues in IE.

tomasAlabes commented 11 years ago

@mikeamara the fix is in the latest code.

ghost commented 11 years ago

Maybe I am not getting it from the correct source. Is this where I am suppose to get the latest code? https://raw.github.com/DmitryBaranovskiy/raphael/master/raphael-min.js This is the download link "Download v. 2.1.0 (89 Kb)" on the home page of raphaeljs.com website .

tomasAlabes commented 11 years ago

The fix from @mlangenberg is in the master branch.