Saturday, 21 March 2009

Problems Upgrading to IE 8

Upgrading to Internet Explorer 8.0

There are plenty of sites already out there listing all the many bugs or "features" that IE 8 has brought to the table but so far the two main ones I have come across are:

Problems when FirebugLite is also running in IE 8.

I was getting a "Function Expected" error on line 1499 in the IsArray function. As a workaround I added the following line as the first line in the function e.g

if(!_object) return false;

This prevents the error but the Firebug-lite console does not display correctly in IE 8 when the document mode is also IE 8. To get round this I set the document mode to IE 7 and then it works fine.

Remember IE 8 now has a console in the developer tools options for outputting custom debug messages plus its now got a great debugger tool with all the same features as Firebug so Firebug-Lite isn't really needed anymore. However it should still be possible to run the two side by side.

Issue with clip and rect function

I also found an "invalid argument" error when setting the clip properties using the rect function. The code was for a scroller and the original version that raised the error was: = "rect(0 " + this.canvasWidth + " " + this.canvasHeight + " 0)";

The fix was to add "px" after the dimension values and separate the values with commas e.g = "rect(0px, " + parseInt(this.canvasWidth) + "px, " + parseInt(this.canvasHeight) + "px, 0px)";

I have come across a few errors such as "null is null or not an object" (you don't say!) which have been simple fixes and have just required testing the values correctly before using them.

I am sure there are hundreds more errors and that many many hours will be devoted to fixing them all in a similar manner to the last 2 major releases of IE. However overall I am very happy that they seem to have caught up with Firefox and the others and have implemented a pretty decent developer tools section including a great debugger that actually gives you a useful error message for once. Plus I like the fact that the GUI hasn't changed very much in the way that IE 6 to IE 7 did and I do like the little touches like the accelerators.

However its a shame that with such a major release they couldn't have gone the whole hog and sorted their Javascript engine out to make that standards compliant as well as the CSS. Apparently they have rewritten the whole JS engine so now was as good a time as any to bite the bullet and do it and they would have made the whole web development community very happy if they had done so. Even with the rewrite their event model is still pretty shoddy and even if they wanted to keep with their intermediary event model (attachEvent, removeEvent, returnValue, srcElement etc) then they could have fixed those annoying little issues that people have spent thousands of development hours resolving such as the this keyword referring to the window and not the object in question and attaching event listeners in order rather than randomly.

It seems pretty likely that more and more companies will get to the point where developing for IE becomes too much work and stop supporting it. Market share of Firefox, Chrome, Safari and Opera are increasing all the time so it may not be that long until you find a lot of sites just redirecting to a Mozilla download page when you access their site in IE. If that does happen then it might be a shame to some people but Microsoft will only have themselves to blame and may find that they have missed a great opportunity with this release to prevent that from occurring.


zooplah said...

"It seems pretty likely that more and more companies will get to the point where developing for IE becomes too much work and stop supporting it."
Well, we can all dream, but I don't see this happening any time soon.

R Reid said...

I don't either but its quite problematic when a lot of corporate intranets are built for IE6 and they refuse to upgrade due to time/support issues. One of our larger sites is in this boat and because the company staff are not allowed to upgrade their browsers it means we are forced to support IE6 for some time yet. Also looking at my user stats (for 150+ sites) for today it broke down 47% IE7, 35% IE6, 12% FF. So with such a huge market share still they are going to be around for some time yet.

Cindy said...

Hey, I have a question is anyone can help here. Upgraded to IE8 and now laptop keeps restarting itself over and over again. Anyone know how the heck to fix this without wiping out the hard drive and starting over? Thanks!

R Reid said...

Doesn't sound too good whatevers happened to your laptop. When you say it keeps restarting itself do you mean that the IE 8 installation keeps saying it needs a restart to complete or that every time you turn on the laptop it just restarts itself automatically? How far does the boot up process get before restarting itself? Have you run a virus / spyware scan? It maybe that your laptop was infected before the upgrade to IE8. I am just randomly thinking aloud here but if you think you have a virus run a tool such as hijackthis and send the report log to one of the specialist forums that deal with analysing it.

Cindy said...

R. Reid. Thanks for getting back to me. The whole restart thing started after IE8 restarted after install. Now it just does it over and over again and only makes it to a screen that you would get "if Windows was not shut down normally" and gives you the option to Start Windows Normally. Without pushing enter it starts again and ends up at that screen over and over. Hey random thoughts are good! Does any this make sense to you in terms of "did I explain this okay", lol! The laptop is virus protected up the ying yang and all other. Thanks. Operating system is XP Pro.

R Reid said...

I had a similar problem on my Dell laptop the other month when after carrying out an update to Adaware it asked me to reboot and then it would only ever get to the "your computer failed to close correctly page" and offered me the safe mode options. None of these would let me in (have you tried all the safe mode options>? If not do so and then reboot once in)
as it would blue screen straight away.
So I then went into the diagnostics manager (hit F12 on boot up) and I ran a full disk scan and it came back with an error on the drive. I thought I was screwed but the boys at work managed to fix it for me doing ???? I can't remember what they did but I didn't loose anything :) I know you can try running CHKDSK /r if you can get into command prompt OR have your windows CD and boot from that pressing R. That might fix it. Try one of the on-line discussion forums but there's a good chance you will get back in without loosing anything.

Cindy said...

Do you know of a good one I can go too? You mean this isn't one? lol Yeah tried booting with the disk, haven't done chdsk yet I don't think, my son-in-law and daughter have done some things, it's actually his laptop. Well till next time. If you think of anything, please let me know, otherwise maybe a place I can go look for remedy. Thanks R.