One of the things I learned a long, long time ago, is that if you are tired or have been working on something for too long, take a break, or wait till tomorrow to finish it. It has been a very, VERY painful learning process for me and by now I would have thought it would stick, but it hasn’t 🙁
Last weekend, for a short period of time, you may have noticed that my original left hand menu or as I call it sidebar had disappeared! This was yet another case of not paying attention to lessons that I had learned.
I had noticed from time to time, that the visual editor in WordPress randomly places it’s cursor at different spots within a document or theme that I was editing. To be blunt, it’s an annoyance. But thanks to the undo feature that I am able to call up through Firefox it usually remains just that, an annoyance.
As you may recall, I had recently spent a lot of time studying and evaluating just how all the PHP and the CSS file worked and managed to get my blog looking pretty close to where I wanted it for now. Well, on the weekend I wanted to make just a few very minor changes to my left hand menu.
I had just added an Email Me button on the sidebar and designed it in such a way that spammers couldn’t just automatically copy it off the website and add it to their list (to see what I mean just put your cursor on the Email Me button on the left hand menu – a note should pop up for you.) Things were moving pretty good, and the minor changes that I was doing seemed quite easy.
It was getting late (about 11:30 p.m.) and I wanted to make just one more “small” adjustment… I wanted to increase the related Google links/ads underneath my sidebar from one to about three to four. To do this I had to log into my Google account and generate some new code. I then copied the code, pasted it into my sidebar code, saved it and then previewed it to see how it looked. It took less than 4 minutes…
I saw instant disaster. Somehow, when I pasted the new code into my sidebar code, my cursor had moved from near the bottom of the file, to one line from the top. All my original code was overwritten! The preview showed that I had just erased my entire sidebar menu except for the new Google ads that I had pasted in. To make matters worse, I couldn’t use the undo feature of Firefox because I had already saved the file and I had no backup! 🙁
Since the sidebar held all the menu’s and navigation aids for my blog, I had no choice but to spend the next two hours rebuilding the sidebar and returning it to it’s original state. The first thing I had to do was to find the original code that I had borrowed the sidebar design from. Thankfully I found that I still had the original file on my own computer and uploaded it to my blog site.
I then spent the next hour and a half trying to remember all the changes that I had done, in order to fit it into my current theme and getting it to look the way it used to. Of course, being now more tired and more frustrated I made even more mistakes that had to be corrected. This dragged the process out even further.
Finally, I finished at around 2:00 a.m. and things looked close enough for me to say “done”! The last thing I did before logging off was to FTP a fresh copy of my modified theme to my home computer, for when I do this again (notice that I didn’t say if… I know myself too well).
Since last weekend, I have done a fair bit of research on the web to see if anyone else suffers from this sporadic cursor challenge, and I have yet to find anyone. It’s possible this problem is unique to me. If anyone else has this problem and hopefully solved it I would appreciate hearing about it.
I did find one site that mentioned that the WordPress editor is actually a scaled down, modified version of a java editor called TinyMCE. Now I admit that I don’t know if the problem is with Firefox, WordPress or both but I think that I need to track this down as I know that this “feature” will bite me again.
I also have to admit that I am intrigued that I might be able to add some extra functionality to my current editor and possibly get rid of my current editor issue at the same time… It looks like some further research and experimentation is necessary… I’ll let you know how things go 😉