There are some amusing aspects of coding, or system administration, that I’ve come to know through the years. One of them is:
When you set out to fix a problem, you end up doing a lot more than what you originally intended.
This is what happened to me today. I was aware that my blog looked like it had been put through Liberaces wardrobe, on a bad hair day, when viewed with Internet Explorer. So now that I just had won $160 on blackjack bonus hunting, I thought that lady luck might be on my side. I might give this seemingly strange task a go.
I started IE and took a look at the page. The sidebar elements somehow bleeded into the main page area and all the texts ended up beneath the place where the footer was supposed to be, and all the fonts were screwed up in size. I thought that this might be a problem with the stylesheet. So I started checking it for anything that might cause this strange behaviour. I checked all the places where I had put code to avoid IE breaking, but none of them could cause the things I had seen. I took the opportunity to clean out some old code in the CSS-file and polish it up a little.
Okay then, time to figure out exactly where the sidebar went nuts. I was going to remove some of the sidebar widgets and see what happened. When I accessed the widget manipulation menu I discovered that they weren’t working! What the !#¤%¤¤%? How long had it been like this? Could something have been misplaced when I updated wordpress last time?
I went to my blogs dashboard and saw that 2 days earlier there was an upgrade to Wordpress. I though that it might be a good idea to upgrade and see if that solved my problem. So I started upgrading my wordpress, from 2.0.5 to 2.0.6. It was pretty straightforward, I had just to delete some catalouges and upload the new inform…. wait a minute. Delete some catalouges? Like the wp-includes? Hmm… I had a nagging suspicion that the culprit could be found here, so I checked the information for installing the Widget plugin, and lo and behold if there wasn’t a catalouge there that could reside in the wp-includes catalouge!
I had to find the Widget plugin source, extract the right catalouge and put it back. Said and done. Now I could manipulate my sidebar widgets again! Success! Now then, for the IE problem.
I removed some of my sidebar widgets and it gave very strange effects. Sometimes the sidebar text appeared in the main text area, and sometimes the sidebar text wasn’t even visible at the bottom of the screen. It was as if it disappeared beneath another CSS element. Weird. I messed around little with HTML-code and CSS-code with no success.
Then I thought that I might aswell see if the HTML-code was valid. It might be that something was broken in it that caused IE to behave as it did. So I went to the W3 Validator and input my blogs URL. The horror! The horror! The errors! The errors! There were so many of them! I was reminded of a quote from the movie 2010: “My God, it’s full of stars!”. In my case it would be “My buddha, it’s full of errors!“.
Bleah. I started fixing the errors, one by one. Seeking out the HTML-code, sometimes in .html-pages and sometimes in the sidebar widgets themselves. An arduous task! Took me 30 minutes to complete, but finally the W3 Validator gave me the green lights.
To my utter astonishment my blog suddenly looked okay in IE! Amazing! I was prepared for more error pruning and search for anomalous code! But no need. There it was, bright and shiny and sticking it’s nose out at me! Jeepers!
I started out trying to fix my blog so IE displayed it as it was supposed to be displayed and in that attempt I managed to polish and clean up my CSS-file, upgrade Wordpress, fix my Widget plugin and clean up a lot of HTML-errors! The work I ended up doing was a lot more than I originally intended.
But all is well that ends well. It’s all in a days work for… Mr System Administrator Man!