> home
> how we work
> who we're working for
> about us
> publications
> buy apache essentials
> client login

play
static·red
edmonton and area web development

Current Projects

Edmonton Weather


>>Le blog.

speakeasy archives


it only took me 9 hours...

<< random poetry | Main | it's a little bit frightening... >>

After great struggle, frustration and a blown template database, I've added the ability to remember your info when you post comments....

Oy, what a day. It started out simple enough - throw some javascript into the site to store and retrieve cookie information for the comment system. It was a great plan.

And then things broke. MT suddenly stopped rebuilding files. It threw out a cryptic error saying there was something wrong with the template. "Crap," went I.

So I dutifully removed the javascript I'd just thrown in there and returned it to its original form.

Same error.

"Crap," went I, and started debugging the template file. Eventually, I was able to figure out the offending template variable: <$MTCommentAuthorLink$> -- but <$MTCommentAuthorURL$> and <$MTCommentAuthorEmail$> both worked.

Somewhere along the line, I edited the mt/db/template.db file -- that's when things started to get really fun: now MT wouldn't load the templates at all -- not even for editing! Undoing my changes there didn't help in the least either -- the file was toast, as far as the database was concerned.

"Shit," went I, and now started to focus on how the hell I could get all my templates back. The database was toast, but thanks to the help of my good pal Jay, I was able to recover the data out of the file. This was a very good thing, as I ended up roasting the file shortly after, using the power of db_dump185.

I then set up a test blog, and threw in the templates from speakeasy. It worked beautifully.

[ Insert picture of Darren scratching his head in wonderment ]

As I re-entered the templates in the speakeasy configuration, more errors occurred: MT threw back an error saying it couldn't find the Individual Entries template -- after I'd just edited it; it said it couldn't find the Monthly Archive Template -- after I'd just edited it... you get the gist.

Finally, I repaired all the template data (for speakeasy; my other configured blogs still need to be re-entered) This brought me back to the point I was at 6 hours before: An error with the template data.

About 2am it dawned on me -- maybe the first entry is corrupt. I went to edit the entry, and noticed that there were comments there with no author name. I deleted the comments from the entry, rebuilt, and it worked beautifully.

Go figure.

I threw the comment code back in, and it works like a charm.

Posted by Darren James Harkness on Friday, November 23, 2001 08:59 AM
Trackbacks...


Comments:
>> darren » Friday, November 23, 2001 11:20 AM

I also added in some s for netscape 4.x users.. it should be a little easier for you guys to distinguish entries now


Post a comment









Remember personal info?


Comments:


* under no circumstances will your email address be traded for a sack of quarters. No-sirree.