The case of the missing right sidebar

While my schedule has kept me completely busy with other things, I haven’t had much of a chance to post here. Part of the reason is that the back end (the inner-workings) of this blog have had quite a few problems. It’s been quite sometime that I made the switch from Movable Type to WordPress (these programs that this blog relies upon to operate) and have never regretted it. Just the same, that transition has also been a nightmare. First I had to find a theme that I liked – then, WP went through several updates that broke some of the code on the now defunct theme. That, in turn, led me to try another theme (the one I’m running now) and, of course, WP went through yet another update. Heck, everything seemed to stop working! Well, not quite – things stopped working only when using Internet Explorer, but no problems were evident when using Google Chrome or Firefox. Maybe WP didn’t like IE.

Over the past couple of weeks, I’ve gone in and started tweaking and repairing the messes left behind by all of the upgrades. As to be expected, that too caused additional problems. (Geez, will it ever end?) I even found problems left over from when this blog used MT and didn’t surface until some of the latest updates were done with both WP and the theme. That problem was an especially obnoxious one – some pages had stopped displaying properly (for example, the right sidebar didn’t show up on some pages) a very long time ago and, despite repeated efforts, I simply couldn’t find the cause. I tried changing themes: that didn’t work. I disabled widgets: that didn’t work. I even exported all of the content to and placed it on another site (as a test): that didn’t work!

The interesting thing, however, is that when I recreated this blog on another site and the problem still existed, other test blogs on the same site, did work. Okay, so now I was really confused – could it be the content of each blog that was the problem? (Yeah, I know, I write some pretty heated stuff –  maybe my topics were just too hot! LOL!) If there was something wrong with the content, then if I deleted ALL of the posts (on test blog, that is), then the right sidebar should reappear on the home page (as well as on a few other pages). Well. . .that was it! After deleting all posts, the right side bar worked beautifully!

Now that I had isolated the problem a bit further, I had to find out the specific post or posts that was/were offending WordPress (BTW, I don’t care if the content of my posts offends anyone or anything), I’m referring to the CODE behind them. In order to do that, I had to recreate the blog yet again on the test site and this time, I started removing several posts at a time (I did this in reverse chronological order under the assumption that the older posts had originally displayed properly and were not to blame). Interestingly, that was not the case: I’ve already made well over 100 posts on this blog and it took a bit of time to delete a few posts, test the blog, and then remove some more. I had already removed a large number of them when suddenly, the right bar started to work again. Aha! I had found something! I noted which posts were remaining and recreated the blog yet again. This time, I looked at the last set of posts I had removed: at first glance, I could find nothing wrong with them except one seemed to have had some content missing – that was strange – sure, I make stupid mistakes when I write (who doesn’t?) but most of the post seemed to be missing. Odd, very odd!

To isolate the problem further, I went to the edit screen (dashboard) – the location where I actually write my posts, as well as deal with all of the administrative components of this blog – and looked at the cranky post. It was there that I noticed something unusual that did not show up on the blog itself (the part that is viewable by everyone) – the title of the post contained additional characters and that these characters were HTML code (which should not normally show up here as I was looking at the code using the default “visual edit” screen where everything should display normally. This was the finally clue that led to the solution!  Given that HTML was showing up in places where it shouldn’t I switched to HTML view in the post editor and guess what?! I found a LOT of extra HTML garbage that shouldn’t have been there and that garbage was the extra crap HTML that many Microsoft programs generate – something that millions of people have complained about for years – most Microsoft programs such as Word and other Office programs output so much extra HTML that many other HTML programs contain commands to remove this junk. Unfortunately cutting and pasting materials from other web sites and from Microsoft programs leaves their junk code, even though it is not visible except when using an HTML editor.

Assuming that the junk HTML was the cause of the problem, I then removed all of same posts as I had done during the previous test except for the one that I knew contained it. This time, I suspected that the side bar still would not display properly and, sure enough,  I was right. The next step was to go into the HTML editor for the problem post and manually remove Microsoft’s junk. Guess what? (You get one guess.) After removing the extra needless and worthless code, the right sidebar now displayed properly and the blog worked again! Even more disgusting though is that I had mentioned earlier that there were no problems viewing the blog, even with the bad code, with Firefox or Chrome, the problem only appeared when viewing it with Microsoft’s IE. That’s right, Microsoft’s own junk code is what caused IE to not display the blog properly. Geez! What a huge waste of time it took for me to uncover this problem only to find that Micro$oft was to blame.

How did this happen? There appear to be several reasons: there were other posts that also had the same code – all of those appear to have been written when this blog still used MT. These same posts were originally displayed in older browsers (and I use the updated versions of all of them) – the latest version of IE has compatiblity problems with many web sites (it doesn’t like some of M$ own junk HTML code). Also, WordPress has gone through several major updates (wish they would add a feature to clean up offending M$ HTML). It appears as if I had used cut and paste to copy a press release I was commenting on in the post were I uncovered the solution. Interestingly, the other posts that contained the junk code did not break the right sidebar – I will often us M$ Word to write something and will then use cut and paste to add it to my posts – I manually removed the problem code from those posts too.

Now that this blog is finally working again (it’s been broken for a very long time), maybe I’ll write a bit more.

Leave a Reply

Your email address will not be published. Required fields are marked *