Monday, November 9, 2009

My Trip Over an Apostrophe

I created and continue to maintain the Austin Heart of Texas (AHOT) Designers Council website. (AHOT is a professional organization for printed circuit board designers.) The other day, I uncloaked a navigation link, then uploaded the javascript file, not expecting hiccups. Surprise! Surprise! Surprise! My heart sank when I refreshed the page and saw the content section suddenly hug the left margin, the navigation menu having disappeared! I immediately thought, "¡Ay, Caramba!"

Doh! I had overlooked saving an archive file of what had previously worked. Memories bubbled to the surface of javascript files being extremely unforgiving for such infractions as extra hard returns and omitted back slashes at the ends of lines. I started to formulate a plan to fix my problem but also—for the benefit of possible site visitors—put forth an indicator that I was fixing the site.

I saved the navigation file to an experimental file, stripping everything except the critical start and end of file lines and one destination link. After saving that minimalist file, I uploaded it to the server, then refreshed the site. I was relieved navigation was again viewable. I decided to keep that file as an initial backup file and experiment with a newer working file. With the newer file, I added a notification line—"troubleshooting in progress"—which would stay viewable until I resolved everything.

My methodology shifted to replicating the information as applicable, referring to an older writing sample of the AHOT site. Processing a few lines each time, I would add the html line item codes and back slashes, upload the file, then refresh the page. I finally encountered the offending line that caused the navigation menu to disappear—"AHOT Members' Resumes". It occurred to me that maybe the apostrophe might be "abnormal" (my word). After googling for html code for an apostrophe and finding "’" (& # 8 2 1 7 ; without spaces), I proceeded to replace the symbol in both places. Another save, upload, and refresh. Woohoo! I sure was happy to see the navigation again!

My final acts on the file included rechecking my information and also commenting out my troubleshooting-in-progress text. My lesson learned (relearned) is to back up stuff—especially a javascript file—before changing it.

2 comments:

lmk said...

Many people don't backup their computer files. This can be disastrous if one does not store files online. Perhaps, as people become accustomed to storing data and using applications online, rather than on their own computers, it will not be as necessary to backup files on one's computer

whilldtkwriter said...

Note: This article reflects the AHOT website and navigation before migration to http://dc-homepages.ipc.org/index.asp?sid=34&pid=249 that occurred in mid-February 2010.