After feeling pretty pleased that I had so easily switched from the old site’s templates to MT4’s, I spent this weekend fine-tuning my sidebar and transferring static pages into the MT4 content management system.
Then I decided to check out how valid my pages were. Horrors! I had 128 errors.
The majority of errors were caused by Movable Type code, with problems popping up in all sorts of templates, modules and widgets.
The ‘abbr’ tag in each post’s timestamp had some invalid parameters which I deleted and so far it doesn’t seem to have affected the blog. There were class names for styles I couldn’t find listed in the stylesheets. It seemed to be system-generated because the style names took this form: class=”style-name [space] sub-style-name”
and I am not sure if we allow for styles with spacing between them! Anyway after I deleted them, nothing seemed to happen.
(Aside: I also noticed these complicated style names with spaces between them, when I was working on my new church website, which uses Joomla, another content management system. Lots of new style names were being generated that we couldn’t find in any of the stylesheets. In fact the developer and I still could not clean up all the weird styles because we didn’t know where to search!!)
As I’ve been blogging for several years, my monthly listings were pretty long, so I switched to the Monthly Archives dropdown menu widget instead. However, it too generated errors as it had two consecutive ampersands in the code. I don’t understand why they needed to be there because I’m no developer, added the ‘amp;’ crossed my fingers and the dropdown menu still works.
After fixing all the MT4 template validation errors, I turned to the stuff I had knowingly embedded. There was a YouTube video which I hadn’t bothered to fix yet. It is troublesome validating YouTube code everytime I want to insert a video. However on doing some quick Googling, I found this service where you can paste your YouTube embed code in, and generate valid code!
Twitter, as usual, was another big culprit, with ampersands galore. It also uses the outdated ‘embed’ tag. I figured out how to convert this into valid ‘object’ code and now Twitter is causing no more validation problems. Thanks to Poolie for the original valid Twitter Flash code, which I adapted for the ‘Twitter with friends’ widget, and to Dom for sending me Poolie’s tip via Twitter last year.
The next thing I’m going to do is to convert some of the MT include templates to PHP includes, which are more flexible. I don’t want to keep re-publishing every single page to reflect the latest updates on my sidebar. I’ve always wondered why MT (including earlier versions) structured its templates in a less dynamic way, unlike Wordpress. I’m no expert and have missed out some advanced feature, so I’ll stand corrected if you have anything to point out.
The latest beta version of MT4 apparently aims to address user complaints that the template structure is too complicated. I totally agree. If you’re a developer, MT isn’t a problem, but for many of us it can still be daunting. Of course, you must have some level of skills to have installed MT on your server in the first place. But MT can still be simplified.
As of this time of writing, my home page, at least, is valid. Go check.