How I Fixed the Comment Form
December 22nd, 2005
For the longest time I was having trouble with my comment form. Whenever someone would try to post a comment Typo (the blog engine that runs this site) would eat the comment. Actually, the comment would get posted, but it would look like it got eaten. This resulted in a lot of double comments as people tried to get their comment to post.
I finally figured out that the problem was with Measure Map. For some reason Typo did not like the javascript that Measure Map provides to track the comments on your blog. Measure Map has you place a tiny bit of javascript inside each comment, so that as each comment is posted, a little bit of data is sent to Measure Map to tell it that you have a comment. Typo uses an AJAX script for the comments, and for some reason the presence of the Measure Map javascript in the comment would cause the new comment to not show up.
The fix was to remove the javascript from the comment partial and put it into a separate file. I got this tip from blog.talbott.us. I don’t think it’s really a good long-term solution because the javascript is not loaded immediately upon posting the comment like it should be. In order for Measure Map to register that the comment was posted the page would have to be reloaded. It works for now, but I’m going to keep playing with it to see if I can find out why the original error was happening.
The code for placing the Measure Map scripts in your Typo blog can be found here: http://blog.talbott.ws/articles/2005/11/10/typo-measuremap-goodness.
Sorry, comments are closed for this article.